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

# Image generations

> POST /images/generations — OpenAI-compatible text-to-image.

## Endpoint

```
POST /api/v1/images/generations
```

## Request body

| Field              | Type   | Description                   |
| ------------------ | ------ | ----------------------------- |
| `model`            | string | Image model id, or `auto`     |
| `prompt`           | string | Required text prompt          |
| `response_format`  | string | `b64_json` (default) or `url` |
| `width` / `height` | number | Optional when supported       |
| `seed`             | number | Optional                      |
| `negative_prompt`  | string | Optional                      |

## Example

```bash theme={null}
curl https://chat.icelake.io/api/v1/images/generations \
  -H "Authorization: Bearer $ICELAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "prompt": "A crystalline lake under aurora",
    "response_format": "b64_json"
  }'
```

## Response

```json theme={null}
{
  "created": 1710000000,
  "data": [
    { "b64_json": "..." }
  ]
}
```

When `response_format` is `url`, each item uses a data URL string in `url`.

Requires the `images` scope on the API key. Charges **credits**.
