> For the complete documentation index, see [llms.txt](https://diffio.ai/llms.txt). This page is also available as HTML at https://diffio.ai/docs/api-reference/list-project-generations/.

# List a project's generations

Lists a project's generations (both full restores and transcript edits) newest first, one page at a time.

GET `https://api.diffio.ai/v2/projects/{project_id}/generations`

- Key scope: `generations:read`
- Auth header: `Authorization: Bearer <apiKey>`
- Body: None

1. GET `/projects/{project_id}/generations` `data[]` newest first, `next_cursor`
2. Pick `status: complete` its `id`
3. GET [/projects/{project_id}/generations/{generation_id}/media](https://diffio.ai/docs/api-reference/get-generation-media/) `files` URLs

## Request

Pass `project_id` in the path and optional `limit` and `cursor` query parameters.

### Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | string | Yes | Unique identifier of the project. |

### Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | No | Maximum number of items to return per page, from `1` to `100` (default `20`). |
| `cursor` | string | No | Opaque pagination token from the previous page's `next_cursor`. |

### Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Diffio-End-User` | string | No | Optional end-user identifier (up to 128 characters). Scopes the request to that end user's projects; omit to act across the whole account. |

## Example request

**Python**

```python
import os
from diffio import DiffioClient

key = os.environ["DIFFIO_API_KEY"]
client = DiffioClient(api_key=key)

page = client.generations.list(
    "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
)
```

**Node.js**

```javascript
import { DiffioClient } from "diffio"

const client = new DiffioClient({
  apiKey: process.env.DIFFIO_API_KEY,
})

const page =
  await client.generations.list(
    "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
  )
```

**cURL**

```bash
curl "https://api.diffio.ai/v2/projects/62f62565-049f-5e7e-bbd2-9de0cf7ddbfe/generations" \
  -H "Authorization: Bearer $DIFFIO_API_KEY"
```

## Response

Returns a `list` page of `Generation` objects ordered newest first, with `next_cursor`.

Success: `200`

### Response fields

| Field | Type | Present | Description |
| --- | --- | --- | --- |
| `object` | string | Always | Resource type, always `"list"`. |
| `data` | array | Always | Page of `Generation` objects (same fields as [Get a generation](https://diffio.ai/docs/api-reference/get-generation/)), newest first. |
| `next_cursor` | string \| null | Always | Opaque cursor to pass as `cursor` for the next page, or `null` on the final page. |

## Example response (200)

**Response, key fields: Response: key fields**

```json
{
  "object": "list",
  "data": [
    {
      "id": "ce832a32-a1ce-516a-b8bd-75457bd8517f",
      "status": "complete",
      "model": "diffio-4.7-flash"
    }
  ],
  "next_cursor": null
}
```

**Full response: Successful response**

```json
{
  "object": "list",
  "data": [
    {
      "id": "ce832a32-a1ce-516a-b8bd-75457bd8517f",
      "object": "generation",
      "project_id": "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
      "status": "complete",
      "stage": "complete",
      "stage_progress": null,
      "queue": null,
      "warnings": [],
      "label": "Take 1",
      "kind": "restore",
      "source_generation_id": null,
      "edit": null,
      "transcript_editable": false,
      "duration_seconds": 31.8,
      "quality_score": 4.572,
      "transcription_status": "ready",
      "files_available": [
        "audio",
        "audio_mixed",
        "hls_master",
        "hls_original",
        "hls_restored",
        "metadata",
        "stems_manifest",
        "transcript",
        "waveform_original",
        "waveform_restored"
      ],
      "error": null,
      "model": "diffio-4.7-flash",
      "requested_model": "diffio-flash",
      "substituted": false,
      "price_per_hour_usd": 5,
      "stems_status": "ready",
      "created_at": "2026-11-13T00:33:27.117344Z",
      "updated_at": "2026-11-13T00:33:40.864000Z"
    }
  ],
  "next_cursor": null
}
```

## Return codes

- `200` Returns a page of generations for the project.
- `400` Invalid `limit` or `cursor` query value, or `Diffio-End-User` exceeds 128 characters. [`invalid_parameter`](https://diffio.ai/docs/api-reference/errors/#invalid_parameter) [`invalid_header`](https://diffio.ai/docs/api-reference/errors/#invalid_header)
- `403` Key is inactive or lacks `generations:read`. [`permission_denied`](https://diffio.ai/docs/api-reference/errors/#permission_denied)
- `404` No project with that `project_id` exists for this account and end user. [`project_not_found`](https://diffio.ai/docs/api-reference/errors/#project_not_found)
- **`401` `405` Same on every endpoint**

  - `401` Missing API key (code missing_api_key), or invalid API key (code invalid_api_key).
  - `405` HTTP method not supported on this path; check the Allow header (code method_not_allowed).

### Example error response

Errors are JSON: an `error` object with `code`, `message` and `request_id`. An unrecognized key returns `401`:

**Error response**

```json
{
  "error": {
    "code": "invalid_api_key",
    "message": "Invalid API key.",
    "request_id": "dead773b60e148fd9e22d680a22fa701"
  }
}
```

## Notes

- Includes both `kind: "restore"` generations and `kind: "edit"` generations created by [Edit a generation's transcript](https://diffio.ai/docs/api-reference/create-transcript-edit/).
- Use `client.generations.iter(project_id)` in Python or `for await (const gen of client.generations.list(projectId))` in Node.js to iterate through every page.

## Related pages

- Previous: [Create a generation](https://diffio.ai/docs/api-reference/create-generation/): Start a speech restoration generation on a project with a chosen model.
- Next: [Get a generation](https://diffio.ai/docs/api-reference/get-generation/): Check one generation's status, live stage progress, queue position, available files, or failure reason.

- [Models](https://diffio.ai/docs/overview/models/): Choosing between Diffio 4.7 Flash and Pro.
- [API model cards](https://diffio.ai/api-model-cards/): Best uses for each model id.
- [API pricing](https://diffio.ai/api-pricing/): The current rate per hour for each model.
- [Webhooks guide](https://diffio.ai/docs/developers/webhooks/): Get notified when a generation finishes instead of polling.
