Get generation

Returns one generation, with a fresh output.url on every call.

GET/v1/generations/{id}

To follow a job, use webhooks, or poll about 20 seconds after you create it, then every 5 seconds.

curl -sS "https://api.foodshot.ai/v1/generations/$GENERATION_ID" \  --max-time 60 \  -H "Authorization: Bearer $FOODSHOT_API_KEY"
Response 200 OK
{  "id": "gen_4Kq9xT2mVb7Zp1Ls8Hc3Rw",  "object": "generation",  "environment": "live",  "status": "succeeded",  "created_at": "2026-10-18T10:42:07.512Z",  "started_at": "2026-10-18T10:42:09.031Z",  "completed_at": "2026-10-18T10:42:42.870Z",  "style_id": "pure-shot",  "instruction": null,  "aspect_ratio": "1:1",  "resolution": "4k",  "format": "jpeg",  "metadata": {    "dish_id": "d_456",    "vendor_id": "v_1029"  },  "credits_charged": 1,  "output": {    "url": "https://api.foodshot.ai/v1/files/gen_4Kq9xT2mVb7Zp1Ls8Hc3Rw/image.jpg?exp=1792406595&sig=VT5DMYyFzJsUzoKdU9fob--vTZ1Nx5PFShO290vXCjc",    "url_expires_at": "2026-10-19T10:43:15.000Z",    "available_until": "2026-11-17T10:42:42.870Z",    "content_type": "image/jpeg",    "width": 4096,    "height": 4096,    "bytes": 8734516  },  "error": null,  "delivery": {    "status": "delivered",    "attempts": 1,    "last_status_code": 200,    "last_attempt_at": "2026-10-18T10:42:43.402Z"  }}

Path parameters

id*string

The generation id (gen_…).

Responses

StatusMeaning
200The generation.
404No such generation for this key in the last 90 days.

Like every endpoint, this one can also answer 401, 403, 429, 500 or 503. Every error has the same body. Errors says what each code means and what to do.