The Batch Upload API uploads local image files or image URLs in bulk to Bach storage and returns image URLs that can be used with the generation endpoints. You can use this tool to prepare the image URLs required by image_url, image_urls, or reference_inputs before calling endpoints such as Image to Video or Elements to Video. It is designed for consolidating asset processing before generation, reducing failures caused by inaccessible image URLs, inconsistent formats, or oversized files.
Use Cases
Upload local images to obtain HTTP/HTTPS image URLs usable in the API.
Re-host existing image URLs in bulk as stable, accessible asset URLs.
The full request URL consists of the base URL and the endpoint path; see API Basics.
Upload Limits
Item
Limit
Images per batch
Up to 300
Size per image
Up to 10 MB
Supported formats
jpg, jpeg, png
Supported MIME types
image/jpeg, image/png
Upload via URL
The URL method is suitable for uploading images that are already accessible online; the system re-hosts these images as image URLs usable in the generation endpoints.
Request Parameters
Parameter
Type
Required
Default
Description
upload_type
string
Yes
-
Upload method. Fixed value: url
images
array
Yes
-
Image list, up to 300 items
images[].image_data
string
Yes
-
Image URL; must be an HTTP/HTTPS URL in a supported format
images[].image_name
string
No
-
Custom image name; generated by the system if omitted
batch_id
string
No
-
Custom batch ID; generated by the system if omitted
Constraints: images must not be empty and supports up to 300 items; each image is limited to 10 MB; the image URL must contain a recognizable file extension.
{"code":200,"data":{"batch_id":"product-images-001","total_count":2,"message":"Batch upload task submitted. please use batch id to query upload progress.","status":"TASK_PENDING"},"timestamp":1778313600}
Field
Type
Description
batch_id
string
Batch ID, used to query the upload status and results
The file method is suitable for directly uploading local image files. This endpoint uses multipart/form-data; set the file upload Content-Type accordingly here.
Request Parameters
Parameter
Type
Required
Default
Description
files
File[]
Yes
-
Array of image files, up to 300
image_names
string[]
No
-
Array of custom image names; when provided, its length must match files
batch_id
string
No
-
Custom batch ID; generated by the system if omitted
Constraints: files must not be empty; each file is limited to 10 MB; when image_names is provided, its length must match the number of files.
{"code":200,"data":{"batch_id":"product-images-002","total_count":2,"message":"Batch file upload task submitted, please use batch id to query upload progress.","status":"TASK_PENDING"},"timestamp":1778313600}
Query Upload Status
Path Parameters
Parameter
Type
Required
Description
batch_id
string
Yes
Batch ID returned when the upload task was submitted
Request Example
bash
Copy
curl -X GET '<BASE_URL>/batch-upload/status/product-images-001' \
-H 'Authorization: Bearer <API_TOKEN>'
Returned once all images in the batch have finished processing
results[].index
integer
Index of the image in the request list, starting from 0
results[].image_name
string
Image name
results[].image_url
string
Image URL after a successful upload
results[].status
string
Upload status of the individual image
results[].error_message
string
Returned when an individual image upload fails
Status Reference
Status
Description
TASK_PENDING
Upload task submitted, waiting to be processed
TASK_PROCESSING
Upload task is being processed
TASK_SUCCEEDED
All images in the batch have finished processing
TASK_FAILED
Batch processing failed
Notes
The image_url values returned by Batch Upload can be used with any endpoint that requires image URLs, such as Image to Video and Elements to Video.
results is only returned once every image in the batch has finished processing; while processing, use processed_count, success_count, failed_count, and pending_count to gauge progress.
results[].index corresponds to the order of images or files at submission time, making it easy to map returned URLs back to the original assets.
For the error structure and general troubleshooting, see Error Handling.