Images and video
Jobs
Image and video requests create a job. Its status moves from
queued to running to completed or failed.Get a job
GET
/v1/jobs/:idcurl
curl https://api.sweetrouter.com/v1/jobs/JOB_ID \
-H "Authorization: Bearer $SWEETROUTER_API_KEY"response
{
"id": "cmg8x2k0d0001",
"object": "job",
"type": "image",
"status": "completed",
"prompt": "a red apple on a wooden table, soft window light",
"num_outputs": 2,
"outputs": [
{
"index": 0,
"status": "completed",
"url": "https://<storage-host>/results/2026-10-04/cmg8x2k0d0001/0.webp?X-Amz-Signature=...",
"content_type": "image/webp",
"width": 832,
"height": 1280,
"seed": 1844674407
},
{ "index": 1, "status": "completed", "url": "https://...", "content_type": "image/webp", "width": 832, "height": 1280, "seed": 92133 }
],
"output_text": null,
"error": null,
"cost_usd": "0.10",
"refunded_usd": "0.00",
"created_at": "2026-10-04T09:12:03.120Z",
"finished_at": "2026-10-04T09:12:13.410Z",
"expires_at": "2026-10-05T09:12:13.410Z",
"expired": false
}Poll every 2 seconds for images and every 5 seconds for videos, or skip polling with Webhooks. Failed jobs are refunded automatically.
List jobs
GET
/v1/jobsReturns data, newest first. Filter with status and type, set limit up to 100, and pass next_cursor back as cursor for the next page.
curl
curl "https://api.sweetrouter.com/v1/jobs?limit=20&status=completed" \
-H "Authorization: Bearer $SWEETROUTER_API_KEY"Retention
Output URLs are signed and stop working after 24 hours, when the files are deleted. Download anything you want to keep.
Limits
Each account can have 20 image or video jobs queued or running at once. Further requests get 429 until some finish.