Upload reference images
Several generation routes take a publicly reachable image URL as input — Seedance first/last frame, Kling omni first frame, and the Grok Imagine video input image. If your image only exists locally, upload it here first and use the returned URL in those requests.
Upload an image
POST https://inference-api-pre-d80ca3.worldrouter.ai/v1/images/uploadsSend multipart/form-data with a single file field named image:
curl -X POST "https://inference-api-pre-d80ca3.worldrouter.ai/v1/images/uploads" \
-H "Authorization: Bearer your_api_key" \
-F "image=@./first-frame.png"Typical response:
{
"object": "image.upload",
"id": "imgupl_5f3a1c2e9b8d4e7fa61b2c3d4e5f6a7b",
"url": "https://oss.example.com/images/uploads/20260612/imgupl_5f3a....png?X-Amz-Signature=...",
"content_type": "image/png",
"size_bytes": 482133,
"expires_at": "2026-06-19T10:00:00+00:00"
}Pass url directly as the image URL field of a generation request (for
example ImageList[].ImageUrl for Kling, image.url for Grok video, or the
first_frame / last_frame content parts for Seedance).
Limits and behavior
- Accepted types: PNG, JPEG, WebP, GIF. The file content is sniffed —
mislabeled files are rejected with
400. - Maximum size: 10 MiB (the dashboard Playground uploader caps at 4 MB).
- The returned URL is presigned and expires after 7 days; uploaded objects are deleted on the same schedule. Re-upload if you need a fresh URL.
- Uploads are authenticated with your API key but are not billed.
Seedance reference images (reference_image roles) still
require the asset flow — register the uploaded URL via the asset-group
routes to obtain an asset:// URI.
First/last frame fields accept the uploaded URL directly.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
400 unsupported type | The file is not PNG/JPEG/WebP/GIF | Convert the image, or check the file is not corrupt. |
413 too large | The file exceeds the upload limit | Compress or resize the image, or host it yourself. |
503 storage unavailable | Object storage is temporarily unreachable | Retry shortly; nothing was stored. |
See also
- Async image tasks: create/poll image generation jobs.
- Kling video guide · Seedance video guide · Grok video guide