# Official image models

Text-to-image and image-to-image calls for the official image models.

Do not send `response_format`. Read the image from `data[0].url`.

Models: `gpt-image-2-t`, `gpt-image-2.5-flare-t`, `gpt-image-2.5-sunburst-t`, `gpt-image-2.6-flare-t`, `gpt-image-2.6-sunburst-t`.

## Text to image

```bash
curl https://kaienapi.com/v1/images/generations \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2-t",
    "prompt": "A small red paper boat on calm blue water, no text",
    "size": "1024x1024",
    "n": 1
  }'
```

## Image to image

Use the same `POST /v1/images/generations`. Put your own public image URLs in `image`.

```bash
curl https://kaienapi.com/v1/images/generations \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.6-flare-t",
    "prompt": "Keep the same subject. Place a small yellow rubber duck beside it. No text.",
    "image": [
      "https://example.com/reference.png"
    ],
    "size": "1024x1024",
    "n": 1
  }'
```

Put multiple references in the same array, in order, and say what each image is for:

```bash
curl https://kaienapi.com/v1/images/generations \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.6-flare-t",
    "prompt": "Keep the subject from image 1. Use the outfit from image 2.",
    "image": [
      "https://example.com/subject.png",
      "https://example.com/outfit.png"
    ],
    "size": "1024x1024",
    "n": 1
  }'
```
