# Doubao

## Image generation

| API | URL |
|---|---|
| Images | `https://www.aixapi.io/v1/images/generations` |

Model: `doubao-seedream-4-5-251128`. Billed per image.

```python
from openai import OpenAI

client = OpenAI(base_url="https://www.aixapi.io/v1", api_key="sk-...")
resp = client.images.generate(
    model="doubao-seedream-4-5-251128",
    prompt="A red circle on a white background",
    size="2K",
)
print(resp.data[0].url)
```

| Parameter | Values |
|---|---|
| `size` | `2K` |
| `n` | `1` |

The image is returned as a URL in `data[].url`.
