List generations

Lists your generations from the last 90 days, newest first.

GET/v1/generations

While has_more is true, pass the id of the last item as starting_after to get the next page.

curl -sS -G https://api.foodshot.ai/v1/generations \  --max-time 60 \  -H "Authorization: Bearer $FOODSHOT_API_KEY" \  --data-urlencode 'status=succeeded' \  --data-urlencode 'created_gte=2026-10-01T00:00:00Z' \  --data-urlencode 'limit=100'
Response 200 OK
{  "object": "list",  "data": [    {      "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"      }    },    {      "id": "gen_rYSdrrqV4cHBg9RlVFImuf",      "object": "generation",      "environment": "live",      "status": "failed",      "created_at": "2026-10-18T10:40:02.117Z",      "started_at": "2026-10-18T10:40:03.540Z",      "completed_at": "2026-10-18T10:40:31.176Z",      "style_id": "white-hero",      "instruction": null,      "aspect_ratio": "4:5",      "resolution": "4k",      "format": "jpeg",      "metadata": {        "dish_id": "d_457"      },      "credits_charged": 0,      "output": null,      "error": {        "code": "content_refused",        "message": "The photo or the instruction was refused by the content checks."      },      "delivery": {        "status": "delivered",        "attempts": 1,        "last_status_code": 200,        "last_attempt_at": "2026-10-18T10:40:31.655Z"      }    }  ],  "has_more": true}

Query parameters

status?string

Only generations with this status.

One of

  • "queued"
  • "processing"
  • "succeeded"
  • "failed"
created_gte?string

Only generations created at or after this time (RFC 3339).

created_lt?string

Only generations created before this time (RFC 3339).

limit?integer

How many generations to return, 1 to 100.

Default10
starting_after?string

The id of the last generation on the previous page.

Responses

StatusMeaning
200One page of generations, newest first.
400A query parameter is wrong or unknown.

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.