---
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: "Download a generation"
description: "The output file (MP4, PNG/JPG, MP3 or FLAC) of a finished generation."
---
# Download a generation

The output file (MP4, PNG/JPG, MP3 or FLAC) of a finished generation.

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

## Query parameters

| Name | Description |
| --- | --- |
| `inline` | `1` to display instead of download |

## Request

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

## Response

(binary file)

## Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 404 | `not_found` | No such video or generation on this account. |
| 409 | `not_ready` | The video or file is not finished yet. Keep polling. |

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

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