## List generation history

**get** `/generations`

Lists generation history for the authenticated caller, including pending, running, completed, and failed generations. Results are newest first and can be filtered by workspace_id, project_id, and status. Each item includes poll_url; use it to poll pending/running generations and to fetch completed or failed run details and outputs.

### Query Parameters

- `cursor: optional string`

  Opaque cursor for fetching the next page

- `limit: optional number`

  Maximum number of results to return

- `project_id: optional string`

  Project identifier

- `status: optional "pending" or "running" or "completed" or "failed"`

  Run status filter

  - `"pending"`

  - `"running"`

  - `"completed"`

  - `"failed"`

- `workspace_id: optional string`

  Workspace identifier

### Returns

- `generations: array of object { created_at, generation_id, progress, 12 more }`

  - `created_at: number`

  - `generation_id: string`

    Run identifier

  - `progress: number`

  - `project_id: string`

    Project identifier

  - `run_id: string`

    Run identifier

  - `status: "pending" or "running" or "completed" or "failed"`

    - `"pending"`

    - `"running"`

    - `"completed"`

    - `"failed"`

  - `workspace_id: string`

    Workspace identifier

  - `charged_cost: optional number`

    Cost charged in USD

  - `completed_at: optional number`

  - `error_code: optional string`

    Machine-readable run error code

  - `error_message: optional string`

    Human-readable run error message

  - `model: optional object { model_id }`

    - `model_id: string`

      Model identifier

  - `outputs: optional array of object { output_id, type, url }`

    - `output_id: string`

      Run output identifier

    - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

      Run output media type

      - `"imageUrl"`

      - `"videoUrl"`

      - `"audioUrl"`

      - `"text"`

      - `"documentUrl"`

    - `url: string`

      Run output URL or text content

  - `poll_url: optional string`

    URL to poll pending/running runs or fetch completed/failed run details.

  - `started_at: optional number`

- `meta: object { next_cursor, total_estimate }`

  - `next_cursor: string`

    Opaque cursor for fetching the next page

  - `total_estimate: optional number`

    Estimated total matching items

### Example

```http
curl https://app.flora.ai/api/v1/generations \
    -H "Authorization: Bearer $FLORA_API_KEY"
```

#### Response

```json
{
  "generations": [
    {
      "created_at": 0,
      "generation_id": "run_abc123",
      "progress": 0,
      "project_id": "prj_abc123",
      "run_id": "run_abc123",
      "status": "pending",
      "workspace_id": "ws_abc123",
      "charged_cost": 0,
      "completed_at": 0,
      "error_code": "provider_error",
      "error_message": "The provider failed to complete the generation.",
      "model": {
        "model_id": "t2i-flux-2-pro"
      },
      "outputs": [
        {
          "output_id": "output_1",
          "type": "imageUrl",
          "url": "https://media.flora.ai/output.png"
        }
      ],
      "poll_url": "https://example.com",
      "started_at": 0
    }
  ],
  "meta": {
    "next_cursor": "eyJvZmZzZXQiOjIwfQ",
    "total_estimate": 0
  }
}
```
