> ## 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.

# Get Generation

> Check the status and retrieve the result of an AI generation, including the output URL.

Get the current status and result of a generation.

### Headers

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

### Path Parameters

| Parameter | Type | Description |
| - | - | - |
| `id` | string | The generation ID |

### Response Fields

| Field | Type | Description |
| - | - | - |
| `id` | string | Generation ID |
| `status` | string | `pending`, `processing`, `uploading`, `success`, `error` |
| `tool` | string | Tool used |
| `output` | string \| null | URL to generated media |
| `thumbnail` | string \| null | URL to thumbnail |
| `error` | string \| null | Error message if failed |
| `type` | string | Media type: `image`, `video`, `audio`, `text`, `object` |
| `payload` | object | Original request parameters |
| `createdAt` | string | Creation timestamp |

### Status Values

| Status | Description |
| - | - |
| `pending` | Queued for processing |
| `processing` | Generation in progress |
| `uploading` | Uploading to storage |
| `success` | Completed successfully |
| `error` | Failed (see `error` field) |

```bash bash theme={null}
curl https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011 \
  -H "Authorization: YOUR_API_KEY"
```

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

const generation = await response.json();
```

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

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

generation = response.json()
```

```json 200 theme={null}
{
  "id": "507f1f77bcf86cd799439011",
  "status": "success",
  "tool": "create-image",
  "output": "https://files.artificialstudio.ai/generations/abc123.png",
  "thumbnail": "https://files.artificialstudio.ai/thumbnails/abc123.jpg",
  "error": null,
  "type": "image",
  "payload": {
    "model": "nano-banana",
    "prompt": "A serene mountain landscape"
  },
  "createdAt": "2024-01-15T10:30:00.000Z"
}
```

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

```json 404 theme={null}
{
  "message": "Generation not found"
}
```

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.