WorldRouter

Skip to Content
Media GenerationImagesUpload reference images

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

Endpoint
POST https://inference-api-pre-d80ca3.worldrouter.ai/v1/images/uploads

Send multipart/form-data with a single file field named image:

curl
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:

200 OK
{
"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.
Tip:

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

SymptomLikely causeWhat to do
400 unsupported typeThe file is not PNG/JPEG/WebP/GIFConvert the image, or check the file is not corrupt.
413 too largeThe file exceeds the upload limitCompress or resize the image, or host it yourself.
503 storage unavailableObject storage is temporarily unreachableRetry shortly; nothing was stored.

See also

Last updated on