Fittins AI Logo
API docs menu

Reference

Generations

GET/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"
succeeded
{
  "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
}
failed
{
  "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

FieldTypeDescription
idstringGeneration id, gen_…
objectstringAlways "generation".
typeenumimage (video comes later).
statusenumqueued · running · succeeded · failed
created_at, started_at, completed_atstring | nullUTC, ISO 8601.
inputobjectYour request as applied: defaults filled in, the prompt after removing markup.
outputobject | nullWhen succeeded: file_id, url (signed download link), url_expires_at, format (png), width, height, quality (the quality delivered), title and alt_text you can use on your product pages.
creditsobjectestimated when accepted; charged when saved (0 when it failed).
project_idstring | nullThe result in My Generations, when succeeded.
metadataobjectYour own key-value pairs, unchanged.
errorobject | nullWhen failed: { code, message } from the error list.
livemodebooleantrue for live keys.
GET/v1/generations

Lists the generations made with the API, newest first. Filters: ?status= and ?type=. Paging: ?limit= (1 to 100, default 20) and ?cursor= with next_cursor from the page before.

curl
curl "https://api.fittins.ai/v1/generations?status=succeeded&limit=20" \
  -H "Authorization: Bearer $FITTINS_API_KEY"
Questions? Email support@fittins.ai with the X-Request-Id of the request.Next: Uploads →