---
agent:
  instructions: "Use this search API to find relevant Cook Studio content (product, pricing, FAQ, blog articles, example videos) with keywords or natural-language queries instead of crawling pages. Results are returned in Markdown."
  endpoint: "https://cookstudio.ai/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
title: "Get a generation"
description: "Status of one generation. When status is done, file_url points to the output. error_type on a failed one is provider, input or server; failed generations are refunded in full."
---
# Get a generation

Status of one generation. When `status` is `done`, `file_url` points to the output. `error_type` on a failed one is `provider`, `input` or `server`; failed generations are refunded in full.

`GET https://app.cookstudio.ai/api/v1/generations/{id}`

## Request

```bash
curl https://app.cookstudio.ai/api/v1/generations/a91e… -H "Authorization: Bearer $KEY"
```

## Response

```json
{"id": "a91e…", "object": "generation", "status": "done", "credits": 3, "file_url": "https://app.cookstudio.ai/api/v1/generations/a91e…/file", …}
```

## Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `unauthorized` | Missing, wrong or revoked key. |
| 404 | `not_found` | No such video or generation on this account. |

All errors share one shape; see [Errors](https://cookstudio.ai/docs/errors).

Canonical: https://cookstudio.ai/docs/reference/get-generation
