API docs menu
Reference
Generations
/v1/generations/{id}Returns one generation. Poll every 3 to 5 seconds until status is succeeded or failed. Each answer has a fresh download link in output.url, valid for 24 hours.
curl https://api.fittins.ai/v1/generations/gen_7Hq2Mz9TkQ4x1bVnR8sL \
-H "Authorization: Bearer $FITTINS_API_KEY"{
"id": "gen_7Hq2Mz9TkQ4x1bVnR8sL",
"object": "generation",
"type": "image",
"status": "succeeded",
"created_at": "2026-11-04T17:02:11.000Z",
"started_at": "2026-11-04T17:02:13.000Z",
"completed_at": "2026-11-04T17:03:02.000Z",
"input": {
"model_id": "mdl_lib_DM5rQvl3KtlR7nqumd6I",
"product_images": [
{
"url": "https://cdn.mystore.com/p/tshirt-red-front.jpg"
}
],
"location_id": null,
"prompt": "full body, plain light grey background, soft studio light, front view",
"aspect_ratio": "3:4",
"tier": "default",
"quality": "2k"
},
"output": {
"file_id": "file_3f9c2a7b1e0d4c6a8b2f5e1d",
"url": "https://api.fittins.ai/v1/files/file_3f9c2a7b1e0d4c6a8b2f5e1d/content?expires=1793905382&sig=Jk2v…",
"url_expires_at": "2026-11-05T17:03:02.000Z",
"format": "png",
"width": 1536,
"height": 2048,
"quality": "2k",
"title": "Red cotton T-shirt on a model, studio front view",
"alt_text": "Model wearing a red crew-neck cotton T-shirt, light grey studio background"
},
"credits": {
"estimated": 50,
"charged": 50
},
"project_id": "proj_img_1793816582113_k2p9x4",
"metadata": {
"sku": "TSHIRT-RED-M"
},
"error": null,
"livemode": true
}{
"id": "gen_7Hq2Mz9TkQ4x1bVnR8sL",
"object": "generation",
"type": "image",
"status": "failed",
"created_at": "2026-11-04T17:02:11.000Z",
"started_at": "2026-11-04T17:02:13.000Z",
"completed_at": "2026-11-04T17:02:40.000Z",
"input": {
"model_id": "mdl_lib_DM5rQvl3KtlR7nqumd6I",
"product_images": [
{
"url": "https://cdn.mystore.com/p/tshirt-red-front.jpg"
}
],
"location_id": null,
"prompt": "full body, plain light grey background, soft studio light, front view",
"aspect_ratio": "3:4",
"tier": "default",
"quality": "2k"
},
"output": null,
"credits": {
"estimated": 50,
"charged": 0
},
"project_id": null,
"metadata": {
"sku": "TSHIRT-RED-M"
},
"error": {
"code": "content_flagged",
"message": "This product was flagged as sensitive, like lingerie or swimwear, so we couldn't create it. You weren't charged."
},
"livemode": true
}The generation object
| Field | Type | Description |
|---|---|---|
| id | string | Generation id, gen_… |
| object | string | Always "generation". |
| type | enum | image · video · model · location |
| status | enum | queued · running · succeeded · failed · canceled |
| created_at, started_at, completed_at | string | null | UTC, ISO 8601. |
| input | object | Your request as applied: defaults filled in, the prompt after removing markup. |
| output | object | null | When succeeded. Photos and videos: file_id, url (signed download link), url_expires_at, format (png or mp4), width, height, quality (the quality delivered), title and alt_text you can use on your product pages; videos add duration_seconds and has_sound. Custom models and locations: the new model or location. |
| credits | object | estimated when accepted; charged when saved (0 when it failed). |
| project_id | string | null | The result in My Generations, when a photo or video succeeded. |
| metadata | object | Your own key-value pairs, unchanged. |
| error | object | null | When failed: { code, message } from the error list. |
| livemode | boolean | true for live keys, false for test keys. |
/v1/generationsLists the generations made with the API, newest first (live keys see live generations, test keys test ones). Filters: ?status= and ?type=. Paging: ?limit= (1 to 100, default 20) and ?cursor= with next_cursor from the page before.
curl "https://api.fittins.ai/v1/generations?status=succeeded&limit=20" \
-H "Authorization: Bearer $FITTINS_API_KEY"/v1/generations/{id}A generation still queued is canceled and its credits are released: the answer is the generation with status canceled. A finished one is deleted with its files, exactly like deleting it in My Generations: the answer is { "id": "gen_…", "object": "generation", "deleted": true }. A running one answers 409 generation_running; delete it after it finishes.
curl -X DELETE https://api.fittins.ai/v1/generations/gen_7Hq2Mz9TkQ4x1bVnR8sL \
-H "Authorization: Bearer $FITTINS_API_KEY"