> ## Documentation Index
> Fetch the complete documentation index at: https://docs.artificialstudio.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Generations

> Retrieve a paginated list of your AI generations with filtering by status.

Retrieve a paginated list of your generations.

### Headers

| Name            | Type   | Required | Description  |
| --------------- | ------ | -------- | ------------ |
| `Authorization` | string | Yes      | Your API key |

### Query Parameters

| Parameter | Type   | Default | Description                                                                |
| --------- | ------ | ------- | -------------------------------------------------------------------------- |
| `limit`   | number | 20      | Results per page (max 100)                                                 |
| `offset`  | number | 0       | Number of results to skip                                                  |
| `status`  | string | -       | Filter by status: `pending`, `processing`, `uploading`, `success`, `error` |

### Response Fields

| Field                | Type           | Description                                              |
| -------------------- | -------------- | -------------------------------------------------------- |
| `data`               | array          | List of generations                                      |
| `data[].id`          | string         | Generation ID                                            |
| `data[].status`      | string         | `pending`, `processing`, `uploading`, `success`, `error` |
| `data[].tool`        | string         | Tool used                                                |
| `data[].output`      | string \| null | URL to generated media                                   |
| `data[].thumbnail`   | string \| null | URL to thumbnail                                         |
| `data[].error`       | string \| null | Error message if failed                                  |
| `data[].type`        | string         | Media type: `image`, `video`, `audio`, `text`, `object`  |
| `data[].createdAt`   | string         | Creation timestamp                                       |
| `pagination.total`   | number         | Total number of generations                              |
| `pagination.limit`   | number         | Current page size                                        |
| `pagination.offset`  | number         | Current offset                                           |
| `pagination.hasMore` | boolean        | Whether more results exist                               |

<RequestExample>
  ```bash bash theme={null}
  curl "https://api.artificialstudio.ai/api/generations?limit=10" \
    -H "Authorization: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.artificialstudio.ai/api/generations?limit=10',
    { headers: { 'Authorization': 'YOUR_API_KEY' } }
  );

  const { data, pagination } = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.artificialstudio.ai/api/generations',
      headers={'Authorization': 'YOUR_API_KEY'},
      params={'limit': 10}
  )

  result = response.json()
  generations = result['data']
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "507f1f77bcf86cd799439011",
        "status": "success",
        "tool": "create-image",
        "output": "https://files.artificialstudio.ai/...",
        "thumbnail": "https://files.artificialstudio.ai/...",
        "error": null,
        "type": "image",
        "createdAt": "2024-01-15T10:30:00.000Z"
      }
    ],
    "pagination": {
      "total": 150,
      "limit": 10,
      "offset": 0,
      "hasMore": true
    }
  }
  ```

  ```json 401 theme={null}
  {
    "message": "Invalid or missing API key"
  }
  ```

  ```json 429 theme={null}
  {
    "message": "Too many API requests, please try again later"
  }
  ```
</ResponseExample>
