Sign in

List generations

Paginated list of generations created via your API key. Newest first. Use this for dashboards and audit views in your own product.

GET /v1/generations

List generations created via your API key.

Each item has the same shape as `GET /v1/generations/{requestId}` (a `GenerationRecord` discriminated union by `status`). Image URLs in succeeded items are presigned for 23 hours, identical to a single read.

**Filters** (all optional): - `endUserEmail` — only return generations for one of your end-users - `status` — `queued`, `processing`, `succeeded`, `failed`, `expired` - `createdAfter` — ISO 8601 timestamp; only rows strictly newer than this

**Pagination:** `page` is 1-based, `pageSize` defaults to 20 (max 100). The response includes `hasMore` so you don't need a separate count query.

bash
# Request
curl 'https://api.xmode.ai/v1/generations?endUserEmail=alice%40your-product.com&status=succeeded&pageSize=20' \
  -H "Authorization: Bearer xm_live_<your-key>"

# 200 OK
{
  "items": [
    {
      "requestId": "req_3xN7kQ1aJpL9wDvE",
      "status": "succeeded",
      "model": "xSD4.5",
      "prompt": "...",
      "referencesCount": 0,
      "endUserEmail": "alice@your-product.com",
      "createdAt": "2026-05-06T11:24:31.018Z",
      "finishedAt": "2026-05-06T11:25:01.711Z",
      "images": [
        { "id": "img_...", "url": "https://...", "size": "2048x2048", "expiresAt": "2026-05-07T10:24:31.018Z" }
      ],
      "cost": { "xTokens": 10 }
    }
  ],
  "page": 1,
  "pageSize": 20,
  "hasMore": false
}