# Seedream 5.0

Generate images and reference-image compositions with Seedream 5.0.

## Endpoints

Seedream 5.0 uses the OpenAI-compatible image APIs:

```http
POST /v1/images/generations
POST /v1/images/generations/jobs
```

Use the job endpoint when the client should not wait for a long-running request.

## Model ID

```text
seedream-5.0
```

## Important parameters

- `size`: the requested aspect ratio, such as `1:1`, `16:9`, or `9:16`.
- `resolution`: `1k` or `2k`.
- `prompt`: the image description and composition requirements.
- `image`: one public reference URL or an array of reference URLs when supported.

## Text-to-image

```bash
curl https://kaienapi.com/v1/images/generations/jobs \\
  -H "Authorization: Bearer <YOUR_API_KEY>" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "seedream-5.0",
    "prompt": "A clean editorial product photograph of a silver camera",
    "size": "1:1",
    "resolution": "1k",
    "n": 1
  }'
```

## Reference images

```json
{
  "model": "seedream-5.0",
  "prompt": "Keep the product shape from the reference image and create a studio scene.",
  "image": ["https://oss.example.com/reference.jpg"],
  "size": "4:3",
  "resolution": "2k",
  "n": 1
}
```

Reference URLs must be publicly accessible and remain valid while the job runs. Resize large images through your storage or CDN before submitting them.

## Reading the result

Asynchronous requests return a task ID. Poll the matching job endpoint until the status is `succeeded` or `failed`, then read the returned image data or the failure message.
