Skip to content

Upload an image

POST
/v1/upload

Upload an image for use as input to edit, combine, or process endpoints, or as a character reference image for stories. Send the image as multipart/form-data (field name: “image”).

Accepted formats: PNG, JPEG, WebP, still images only. Maximum file size: 50 MB, 40 megapixels, and an aspect ratio of 4:1. The image is scanned by the content classifier before storage — if it’s rejected, you’ll get a 451. A file that cannot be read or checked, or one over those limits, gets a 422 validation_error naming the image field.

The response includes a signed URL (valid 1 hour) that you can pass as input_image_url to other endpoints.

Depicta’s own picture picker and upload page add pictures to an upload link of the Claude connector: with an upload token (UploadTokenAuth) or the link’s upload_code field. Such an upload answers with the picture’s own upload_code and the link’s places left (remaining). When the link can take no more, the 422 validation_error names upload_token or upload_code with one reason: full (its 10 places are used; a refused picture uses one), hourly_limit (the account added 100 pictures in the last hour), expired (its 30 minutes are over) or closed (closed, of another account, or its connection was disconnected or paused). Agents calling the API use neither.

Media type application/x-www-form-urlencoded
object
image

Image file to upload (PNG, JPEG, or WebP). Maximum 50 MB.

string format: base64
upload_code

Optional. The code of an upload link the Claude connector issued (get_upload_link), sent by Depicta’s upload page: the picture is added to the link’s batch of up to 10, and the answer carries its own upload_code for the connector. Agents calling the API leave it out. A link that can take no more is refused with 422 validation_error on upload_code (full, hourly_limit, expired or closed), before the content check.

string
/^[2-9A-HJKMNP-Z]{6}$/

OK

Media type application/json
object
expires_at

ISO 8601 expiry time of the signed URL.

string
remaining

Places left in the upload link’s batch of 10 (refused pictures use a place). Only with upload_code.

null | integer
<= 10
upload_code

The picture’s own upload code, for upload:CODE references in the Claude connector. Only for uploads with an upload token or an upload_code.

string
/^[2-9A-HJKMNP-Z]{6}$/
upload_id

Upload identifier (object storage key).

string
upload_url

Signed URL of the uploaded image. Expires in 1 hour.

string

Bad Request

Media type application/json
object
details
error
string
message
string
request_id
string

Unauthorized

Media type application/json
object
details
error
string
message
string
request_id
string

Payment Required

Media type application/json
object
details
error
string
message
string
request_id
string

Forbidden

Media type application/json
object
details
error
string
message
string
request_id
string

Not Found

Media type application/json
object
details
error
string
message
string
request_id
string

Conflict

Media type application/json
object
details
error
string
message
string
request_id
string

Unprocessable Entity

Media type application/json
object
details
error
string
message
string
request_id
string

Too Many Requests

Media type application/json
object
details
error
string
message
string
request_id
string

Unavailable For Legal Reasons

Media type application/json
object
details
error
string
message
string
request_id
string

Internal Server Error

Media type application/json
object
details
error
string
message
string
request_id
string

Bad Gateway

Media type application/json
object
details
error
string
message
string
request_id
string

Service Unavailable

Media type application/json
object
details
error
string
message
string
request_id
string