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

# Seedream 5.0

> ByteDance Seedream 5.0 image generation API for text-to-image and image-to-image workflows

## Overview

Seedream 5.0 is a ByteDance image generation model for text-to-image creation and reference-guided image generation. It supports 2K and 3K output presets, optional web search, selectable output format, and flexible `size` input for callers who prefer explicit dimensions.

| Capability          | Value                                                     |
| ------------------- | --------------------------------------------------------- |
| Model ID            | `seedream-5-0`                                            |
| Modes               | `text-to-image`, `image-to-image`                         |
| Prompt length       | 1-5000 characters                                         |
| Reference images    | 1-14 URLs for `image-to-image`                            |
| Images per task     | `max_images` is required, 1-10                            |
| Resolution tiers    | `2K`, `3K`                                                |
| Aspect ratios       | `1:1`, `2:3`, `3:2`, `4:3`, `3:4`, `9:16`, `16:9`, `21:9` |
| Size input          | `2K`, `3K`, `2048x2048`, `2048X2048`, `2048*2048`         |
| Output formats      | `jpeg`, `png`                                             |
| Web search          | `true`, `false`                                           |
| Prompt optimization | `standard`                                                |

## Endpoint and authentication

Base URL:

```text theme={null}
https://api.apixo.ai/api/v1
```

| Method | Endpoint                                   | Purpose                               |
| ------ | ------------------------------------------ | ------------------------------------- |
| `POST` | `/generateTask/seedream-5-0`               | Submit a generation task              |
| `GET`  | `/statusTask/seedream-5-0?taskId={taskId}` | Poll task status and retrieve results |

All requests require your APIXO API key:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

Submit requests also require:

```http theme={null}
Content-Type: application/json
```

## Copy-paste async quickstart

This minimal request submits a text-to-image task and returns a `taskId`.

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/seedream-5-0" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "mode": "text-to-image",
      "prompt": "a cozy cyberpunk cafe with neon lights, ultra detailed",
      "max_images": 1,
      "resolution": "2K",
      "aspect_ratio": "16:9",
      "output_format": "jpeg",
      "prompt_optimize_mode": "standard"
    }
  }'
```

Successful response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
```

Save the `taskId`; you need it to poll for the final result.

## Poll for result

```bash theme={null}
curl -X GET "https://api.apixo.ai/api/v1/statusTask/seedream-5-0?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Success response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/xxx.jpeg\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965644132,
    "costTime": 33203
  }
}
```

## Request body

### Text-to-image

```json theme={null}
{
  "input": {
    "mode": "text-to-image",
    "prompt": "a clean product photo of wireless earbuds on soft stone",
    "max_images": 1,
    "resolution": "2K",
    "aspect_ratio": "1:1",
    "sequential_image_generation": "disabled",
    "output_format": "jpeg",
    "prompt_optimize_mode": "standard"
  }
}
```

### Image-to-image

```json theme={null}
{
  "input": {
    "mode": "image-to-image",
    "prompt": "make this scene look like sunrise with warm colors",
    "image_urls": [
      "https://example.com/ref1.jpg",
      "https://example.com/ref2.jpg"
    ],
    "max_images": 2,
    "resolution": "3K",
    "aspect_ratio": "3:4",
    "sequential_image_generation": "auto",
    "output_format": "png",
    "prompt_optimize_mode": "standard"
  }
}
```

### Explicit size

```json theme={null}
{
  "input": {
    "mode": "text-to-image",
    "prompt": "a minimalist industrial poster",
    "max_images": 1,
    "size": "3072X3072",
    "output_format": "jpeg"
  }
}
```

## Parameters

<ParamField body="request_type" type="string" default="async">
  Result delivery mode. Use `async` for polling with `statusTask`, or `callback` for webhook delivery.
</ParamField>

<ParamField body="callback_url" type="string">
  Required when `request_type` is `callback`. Must be a public HTTPS URL that can receive the final task payload. See [Webhooks](/docs/api-reference/webhooks).
</ParamField>

<ParamField body="input" type="object" required>
  Seedream 5.0 input parameters.

  <Expandable title="properties">
    <ParamField body="mode" type="string" required>
      Generation mode. Supported values: `text-to-image`, `image-to-image`.
    </ParamField>

    <ParamField body="prompt" type="string" required>
      Text prompt describing the desired image. Supports 1-5000 characters after trimming whitespace.
    </ParamField>

    <ParamField body="image_urls" type="string[]">
      Reference image URLs. Required for `image-to-image`. Accepts 1-14 public image URLs.
    </ParamField>

    <ParamField body="max_images" type="integer" required>
      Requested image count. Must be an integer from 1 to 10.
    </ParamField>

    <ParamField body="resolution" type="string" default="2K">
      Output resolution preset. Supported values: `2K`, `3K`. When `resolution + aspect_ratio` and `size` are both provided, `resolution + aspect_ratio` takes precedence.
    </ParamField>

    <ParamField body="aspect_ratio" type="string">
      Output aspect ratio. Supported values: `1:1`, `2:3`, `3:2`, `4:3`, `3:4`, `9:16`, `16:9`, `21:9`.
    </ParamField>

    <ParamField body="size" type="string">
      Optional explicit size or preset token. Preset tokens are case-insensitive and support `2K` and `3K`. Pixel strings accept `x`, `X`, or `*` separators, such as `2048x2048`, `2048X2048`, or `2048*2048`. Custom pixel sizes must use 16-pixel granularity, keep aspect ratio between `1/16` and `16`, and keep total pixels between `3,686,400` and `16,777,216` (`2560x1440` to `4096x4096` equivalent). Unsupported custom values may be adjusted to the nearest supported output size.
    </ParamField>

    <ParamField body="sequential_image_generation" type="string" default="disabled">
      Sequential generation mode. Supported values: `disabled`, `auto`.
    </ParamField>

    <ParamField body="prompt_optimize_mode" type="string" default="standard">
      Prompt optimization mode. Seedream 5.0 currently supports `standard`.
    </ParamField>

    <ParamField body="web_search" type="boolean" default="false">
      Enables web search when set to `true`.
    </ParamField>

    <ParamField body="output_format" type="string" default="jpeg">
      Output image format. Supported values: `jpeg`, `png`.
    </ParamField>
  </Expandable>
</ParamField>

### Size presets from `resolution + aspect_ratio`

When `aspect_ratio` is provided, Seedream 5.0 maps `resolution` and `aspect_ratio` to these output dimensions:

| Aspect ratio | `2K` size   | `3K` size   |
| ------------ | ----------- | ----------- |
| `1:1`        | `2048x2048` | `3072x3072` |
| `4:3`        | `2304x1728` | `3456x2592` |
| `3:4`        | `1728x2304` | `2592x3456` |
| `16:9`       | `2848x1600` | `4096x2304` |
| `9:16`       | `1600x2848` | `2304x4096` |
| `3:2`        | `2496x1664` | `3744x2496` |
| `2:3`        | `1664x2496` | `2496x3744` |
| `21:9`       | `3136x1344` | `4704x2016` |

## Response format

### Submit task response

`POST /generateTask/seedream-5-0` returns a task ID when the task is accepted:

<ResponseField name="code" type="integer">
  API status code. `200` means the task was accepted.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data.taskId" type="string">
  Task identifier used for later polling or webhook matching.
</ResponseField>

## Polling and delivery guidance

Seedream 5.0 tasks are asynchronous.

| Resolution | Typical generation time | Recommended first poll  | Poll interval |
| ---------- | ----------------------- | ----------------------- | ------------- |
| `2K`       | 25s-35s                 | 20s after task creation | 3s            |
| `3K`       | 35s-50s                 | 20s after task creation | 3s            |

For production systems, prefer `callback_url` instead of tight polling loops.

## Billing

Seedream 5.0 is billed per generated image. The current public APIXO price is a single flat rate for this model.

| Unit                | APIXO price       |
| ------------------- | ----------------- |
| Per generated image | `$0.0320 / image` |

Billing behavior:

```text theme={null}
precharge = requested max_images * unit price
final charge = successful images * unit price
```

If fewer images succeed than requested, APIXO automatically adjusts the final charge to the actual number of successful outputs.
