Updated on 2025-08-13 GMT+08:00

Uploading an Image

Function

This API is used to upload images to the database.

URI

POST /v1/koosearch/image/{img_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

img_id

Yes

String

Image ID. The format is img-[0-9a-z]{32}.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Parameter description:

Token used for API authentication. For how to obtain the token, see section 3.2 "Authentication."

Constraints:

N/A.

Table 3 FormData parameters

Parameter

Mandatory

Type

Description

image

Yes

File

Image to be uploaded

Response Parameters

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error Code

error_msg

String

Error description

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error Code

error_msg

String

Error description

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

File uploaded successfully.

400

Incorrect request body parameter

500

Internal error

Error Codes

See Error Codes.