# Seedream 5.0 Pro / 5.5 Image Generation

Create text-to-image and reference-guided image generation tasks with `seedream-5.5` or `seedream-5.0-pro`. Requests run asynchronously: create a task, save `task_id`, poll task status, and retrieve generated images from `images[].url` upon completion.

> Model availability depends on the response of `GET /v1/models` for your API key. Neither model supports `/v1/chat/completions`.

## Endpoints & Authentication

| Operation | Endpoint |
|---|---|
| Create task | `POST https://vip.brioi.com/v1/images/async/generations` |
| Poll task | `GET https://vip.brioi.com/v1/images/async/generations/{task_id}` |

```http
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Supported Models & Differences

Both models share the same create/poll endpoints, 1K/2K size table, and maximum limit of 10 reference images, with the following parameter differences:

| Model | `n` (Images per Request) | `watermark` (Visible Watermark) | `strength` (Reference Strength) | `prompt` Notes |
|---|---|---|---|---|
| `seedream-5.5` (Recommended) | Only `1` (default `1`) | Supported; defaults to `false` (visible watermark disabled) | Not supported | Image description or editing instructions |
| `seedream-5.0-pro` | `1–6` (default `1`) | Not exposed | `LOW`, `MID`, `HIGH` | Image description, 3–2000 characters |

## Request Parameters

| Field | Type | Required | Default | Description |
|---|---|---:|---|---|
| `model` | string | Yes | — | `seedream-5.5` or `seedream-5.0-pro`. |
| `prompt` | string | Yes | — | Image description or editing instructions. Limited to 3–2000 characters on `seedream-5.0-pro`. |
| `size` | string | No | `2048x2048` | Exact `WIDTHxHEIGHT`; accepts only the standard 1K / 2K dimensions listed below. |
| `aspect_ratio` | string | No | — | Standard aspect ratio; maps automatically to the corresponding 2K dimension below. |
| `width` / `height` | integer | No | — | Width and height passed as a pair; must match a standard dimension in the table below. |
| `n` | integer | No | `1` | `seedream-5.5` supports only `1`; `seedream-5.0-pro` supports `1–6`. |
| `image_url` | string | No | — | Direct public HTTPS URL for a single reference image. |
| `image_urls` | string[] | No | — | Direct public HTTPS URLs for multiple reference images, applied in array order. |
| `watermark` | boolean | No | `false` | **`seedream-5.5` only**: visible on-image watermarks (such as "AI-generated" badges) are disabled by default; explicit `false` keeps them disabled and explicit `true` enables them (disabling visible watermarks does not strip file metadata or content credentials). |
| `strength` | string | No | — | **`seedream-5.0-pro` only**: global reference strength—`LOW`, `MID`, or `HIGH`. |

- `image_url` and `image_urls` combined accept up to **10** reference images. Omit both fields for text-to-image—do not pass an empty array.
- Reference images must be direct public HTTPS URLs downloadable by the server; local file paths, `localhost`, data URLs, and base64 strings are not supported.
- `seedream-5.5` does not support `strength`, transparent backgrounds, layer splitting, output format selection, or prompt optimization extensions.

## Size & Resolution Rules

Dimension precedence is: `width + height` > `aspect_ratio` > `size` > default `2048x2048`. Pass only one dimension format per request.

- **2K by default**: Omitting dimension parameters or passing only `aspect_ratio` generates a 2K image.
- **Specify 1K explicitly**: When you need 1K output, pass the exact 1K `size` (or `width + height`) from the table below.
- Both models currently support 1K and 2K only (**4K is not supported**); pixel dimensions outside the table below are rejected.

| Aspect Ratio | 1K `size` | 2K `size` | `aspect_ratio` |
|---|---|---|---|
| `1:1` | `1024x1024` | `2048x2048` | Supported |
| `16:9` | `1376x768` | `1920x1080` | Supported |
| `9:16` | `768x1376` | `1080x1920` | Supported |
| `3:2` | `1264x848` | `1536x1024` | Supported |
| `2:3` | `848x1264` | `1024x1536` | Supported |
| `4:3` | `1200x896` | `1536x1152` | Supported |
| `3:4` | `896x1200` | `1152x1536` | Supported |
| `4:5` | `928x1152` | `1536x1920` | Not supported; pass `size` |
| `5:4` | `1152x928` | `1920x1536` | Not supported; pass `size` |
| `21:9` | `1792x768` | `2016x864` | Supported |
| `9:21` | `768x1792` | `864x2016` | Supported |

## Request Examples

### Seedream 5.5 Text-to-Image (2K)

```bash
curl -X POST "https://vip.brioi.com/v1/images/async/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5.5",
    "prompt": "Modern architecture in a misty morning valley, natural light, crisp details",
    "size": "2048x2048",
    "n": 1,
    "watermark": false
  }'
```

Omitting `watermark` produces the same default behavior.

### Seedream 5.0 Pro Multi-Reference Blending

```bash
curl -X POST "https://vip.brioi.com/v1/images/async/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5.0-pro",
    "prompt": "Preserve the subject features from the reference images, blend them naturally into a single mountain-and-water landscape with a crisp five-pointed star in the center, no text",
    "size": "1080x1920",
    "n": 1,
    "image_urls": [
      "https://example.com/reference-1.png",
      "https://example.com/reference-2.png"
    ],
    "strength": "HIGH"
  }'
```

## Task Status & Results

A successful creation request returns `task_id` (indicating the task has entered processing, not that generation is complete):

```json
{
  "status": "SUBMITTED",
  "progress": "10%",
  "task_id": "task_xxxxxxxxxxxxxxxxxxxxxxxx"
}
```

Poll every 3–5 seconds using the same Brioi API key that created the task:

```bash
curl "https://vip.brioi.com/v1/images/async/generations/task_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

| `status` | Meaning |
|---|---|
| `SUBMITTED` | Task submitted; continue polling. |
| `IN_PROGRESS` | Generating or storing image; continue polling. |
| `SUCCESS` | Completed; read non-empty `images[].url` and download promptly. |
| `FAILURE` | Failed; read `fail_reason` (raw diagnostic text—do not parse against a fixed format). |

Example completed response:

```json
{
  "status": "SUCCESS",
  "progress": "100%",
  "task_id": "task_xxxxxxxxxxxxxxxxxxxxxxxx",
  "images": [
    {
      "index": 0,
      "url": "https://cdn.example.com/generated/result.jpg",
      "mime_type": "image/jpeg"
    }
  ]
}
```

## Pricing & Billing

### Seedream 5.5 Billing

Billed by total output pixels; 1K / 2K are request dimension labels rather than the sole billing boundary. Unit prices below are in CNY at a group multiplier of `1`; group or custom discounts settle at your effective multiplier.

| Billing Tier | Unit Price |
|---|---:|
| Output total pixels ≤ 2,610,000 (e.g., `1024x1024`, `1080x1920`, `1920x1080`) | ¥0.13/image |
| Output total pixels > 2,610,000 (e.g., default `2048x2048`, `1536x1920`, `1920x1536`) | ¥0.23/image |
| Input reference images | Included at no extra charge |

### Seedream 5.0 Pro Billing

Billed by 1K / 2K tier and actual number of generated images, with no additional charge for reference images; exact unit prices follow the Model Marketplace listing and your effective group multiplier. Failed generations are refunded through the task refund flow.

## Error Handling

When input parameters do not match the selected model's capabilities, requests return a parameter validation error or task failure rather than silently downgrading tiers, truncating reference images, or altering output image count.

| HTTP Status | Description |
|---:|---|
| `400` | Invalid request parameters. |
| `401` | Missing or invalid API key. |
| `403` | Insufficient balance/quota, or missing permission for this model. |
| `404` | Queried task does not exist. |
| `429` | Rate limit exceeded. |
| `503` | Service temporarily unavailable. |
| `500`, `502` | Transient server error. |

