---
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: "Imagen 4"
description: "Imagen 4 through the Cook Studio API: allowed settings, price estimate and example request."
---
# Imagen 4

One image per request.

|  |  |
| --- | --- |
| Model id | `imagen-4` |
| Type | Image |
| Endpoint | `POST /generations` |
| Available now | Yes |
| `count` | `1` |
| `aspect_ratio` | `16:9`, `9:16`, `1:1`, `4:3`, `3:4` |
| `prompt` | up to 4,000 characters |

## Price

Prices are the same as in the app and can change, so they are not listed here. Ask for the current price first; nothing is charged:

```bash
curl https://app.cookstudio.ai/api/v1/generations/estimate -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model":"imagen-4","prompt":"A red fox in fresh snow, golden hour, shallow depth of field","aspect_ratio":"16:9"}'
```

## Generate

```bash
curl https://app.cookstudio.ai/api/v1/generations -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model":"imagen-4","prompt":"A red fox in fresh snow, golden hour, shallow depth of field","aspect_ratio":"16:9"}'
# → 201 {"id": "…", "object": "generation", "model": "imagen-4", "status": "running", "credits": …}
```

Then poll [`GET /generations/{id}`](https://cookstudio.ai/docs/reference/get-generation) until `status` is `done` and download the file from [`/generations/{id}/file`](https://cookstudio.ai/docs/reference/get-generation-file). A failed generation is refunded in full.

The allowed values on this page are read from the same list the API checks against, and `GET /models` returns them live.

Canonical: https://cookstudio.ai/docs/models/imagen-4
