> ## 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 Pro

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

## Overview

Seedream 5.0 Pro is a ByteDance image generation model for high-quality single-image text-to-image creation and reference-guided image generation. It supports `1K` and `2K` resolution tiers, flexible aspect ratios, optional explicit pixel sizes, and `jpeg` or `png` output.

| Capability       | Value                                                     |
| ---------------- | --------------------------------------------------------- |
| Model ID         | `seedream-5-0-pro`                                        |
| Modes            | `text-to-image`, `image-to-image`                         |
| Prompt length    | 1-5000 characters                                         |
| Reference images | Required for `image-to-image`; 1-10 public image URLs     |
| Images per task  | Exactly 1 output image                                    |
| Resolution tiers | `1K`, `2K`                                                |
| Aspect ratios    | `1:1`, `2:3`, `3:2`, `4:3`, `3:4`, `9:16`, `16:9`, `21:9` |
| Size input       | `1K`, `2K`, `1024x1024`, `2048X2048`, `2048*2048`         |
| Output formats   | `jpeg`, `png`                                             |

## Endpoint and authentication

Base URL:

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

| Method | Endpoint                                       | Purpose                               |
| ------ | ---------------------------------------------- | ------------------------------------- |
| `POST` | `/generateTask/seedream-5-0-pro`               | Submit a generation task              |
| `GET`  | `/statusTask/seedream-5-0-pro?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-pro" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "mode": "text-to-image",
      "prompt": "a cinematic product photo of wireless earbuds on black glass, crisp highlights",
      "resolution": "1K",
      "aspect_ratio": "1:1",
      "output_format": "jpeg"
    }
  }'
```

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-pro?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",
    "resolution": "1K",
    "aspect_ratio": "1:1",
    "output_format": "jpeg"
  }
}
```

### Image-to-image

```json theme={null}
{
  "input": {
    "mode": "image-to-image",
    "prompt": "keep the product shape, change the scene to a premium studio setup",
    "image_urls": [
      "https://example.com/reference-product.jpg"
    ],
    "resolution": "2K",
    "aspect_ratio": "4:3",
    "output_format": "png"
  }
}
```

### Explicit size

```json theme={null}
{
  "input": {
    "mode": "text-to-image",
    "prompt": "a minimalist industrial poster with strong geometric composition",
    "size": "2048x2048",
    "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](/api-reference/webhooks).
</ParamField>

<ParamField body="input" type="object" required>
  Seedream 5.0 Pro 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-10 public image URLs. Each URL must be reachable by APIXO during task submission.
    </ParamField>

    <ParamField body="resolution" type="string" default="1K">
      Output resolution tier. Supported values: `1K`, `2K`. When either `resolution` or `aspect_ratio` is provided, Seedream 5.0 Pro uses the `resolution + aspect_ratio` preset path; missing values default to `1K` and `1:1`.
    </ParamField>

    <ParamField body="aspect_ratio" type="string" default="1:1">
      Output aspect ratio. Supported values: `1:1`, `2:3`, `3:2`, `4:3`, `3:4`, `9:16`, `16:9`, `21:9`. When `resolution + aspect_ratio` and `size` are both provided, `resolution + aspect_ratio` takes precedence.
    </ParamField>

    <ParamField body="size" type="string">
      Optional explicit size or preset token. Preset tokens support `1K` and `2K`. Pixel strings accept `x`, `X`, or `*` separators, such as `1024x1024`, `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 `921,600` and `4,194,304` (`1280x720` to `2048x2048` equivalent). Invalid custom values are rejected instead of auto-adjusted.
    </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 `resolution` or `aspect_ratio` is provided, Seedream 5.0 Pro maps the effective `resolution + aspect_ratio` pair to these output dimensions:

| Aspect ratio | `1K` size   | `2K` size   |
| ------------ | ----------- | ----------- |
| `1:1`        | `1024x1024` | `2048x2048` |
| `4:3`        | `1152x864`  | `2304x1728` |
| `3:4`        | `864x1152`  | `1728x2304` |
| `16:9`       | `1312x736`  | `2848x1600` |
| `9:16`       | `736x1312`  | `1600x2848` |
| `3:2`        | `1248x832`  | `2496x1664` |
| `2:3`        | `832x1248`  | `1664x2496` |
| `21:9`       | `1568x672`  | `3024x1296` |

## Response format

### Submit task response

`POST /generateTask/seedream-5-0-pro` 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>

## Latency and polling

Seedream 5.0 Pro tasks are asynchronous.

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

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

## Billing

Seedream 5.0 Pro is billed per request because each task returns exactly one output image.

| Unit                                             | APIXO price        |
| ------------------------------------------------ | ------------------ |
| Output up to and including 2.36M pixels          | `$0.045 / request` |
| Output above 2.36M pixels                        | `$0.09 / request`  |
| Additional input reference image after the first | `$0.003 / image`   |

Billing behavior:

```text theme={null}
output_charge = selected output pixel tier price
reference_charge = max(0, reference_image_count - 1) * 0.003
final charge = output_charge + reference_charge
```

Failed generations are refunded.

## Practical notes

* Image-count fields are intentionally omitted from this public contract; Seedream 5.0 Pro returns exactly one image per task.
* `3K` and `4K` are not supported by this endpoint.
* `2K + 21:9` maps to `3024x1296`, which preserves the `21:9` ratio while staying within the `4,194,304` pixel limit.
* If `resolution` or `aspect_ratio` is provided together with `size`, the effective `resolution + aspect_ratio` preset decides the output dimensions.
* If you only provide `size`, APIXO uses that explicit pixel size or preset token.
