Upload Image
POST
/api/images/upload
const url = 'https://example.com/api/images/upload';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/images/upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@filePersist 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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
Body_upload_image_api_images_upload_post
object
file
required
File
string format: binary
Responses
Section titled “Responses”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>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}