Skip to content

Upload Image

POST
/api/images/upload
curl --request POST \
--url https://example.com/api/images/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Persist an uploaded image into the output dir so any workflow can reference it.

Deliberately does NOT push to a ComfyUI node here. Node placement is decided at generate time by _ensure_comfy_input_image, which ships the file to the exact node running the job. Uploading to a node up front only works when image and job share a node — it silently breaks multi-node setups (e.g. i2v on a separate GPU). Landing the file in the output dir makes uploads behave like any gallery image.

Media typemultipart/form-data
Body_upload_image_api_images_upload_post
object
file
required
File
string format: binary

Successful Response

Media typeapplication/json
Response Upload Image Api Images Upload Post
object
key
additional properties
any
Examplegenerated
{}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}