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. Maximum file size: 50 MB. The image is scanned by the content classifier before storage — if it’s rejected, you’ll get a 451.

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

object
image

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

string format: base64

OK

object
expires_at

ISO 8601 expiry time of the signed URL.

string
upload_id

Upload identifier (object storage key).

string
upload_url

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

string

Bad Request

object
details
error
string
message
string
request_id
string

Unauthorized

object
details
error
string
message
string
request_id
string

Payment Required

object
details
error
string
message
string
request_id
string

Forbidden

object
details
error
string
message
string
request_id
string

Not Found

object
details
error
string
message
string
request_id
string

Conflict

object
details
error
string
message
string
request_id
string

Unprocessable Entity

object
details
error
string
message
string
request_id
string

Too Many Requests

object
details
error
string
message
string
request_id
string

Unavailable For Legal Reasons

object
details
error
string
message
string
request_id
string

Internal Server Error

object
details
error
string
message
string
request_id
string

Bad Gateway

object
details
error
string
message
string
request_id
string

Service Unavailable

object
details
error
string
message
string
request_id
string