# Seedream 5.0 Pro API

> Seedream 5.0 Pro — fast, high-fidelity AI image generation & editing.

- **Provider**: ByteDance
- **Model id**: `seedream-5-pro-image-to-image`
- **Modality**: image
- **Price**: 4.09–8.15 credits

## Overview

Seedream 5.0 Pro is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `seedream-5-pro-image-to-image` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL we POST the finished task to. Signed with `X-Webhook-Signature` once you create a webhook signing key in Dashboard → Settings |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | Yes | A text description of the image you want to generate Max 3000 characters. (example: Create a premium 3:4 editorial infographic poster titled exactly: “THE ANATOMY OF A HIT” Hero visual: one gigantic transparent cassette tape shown in dramatic… — full value in the request example) |
| image_urls | string[] | Yes | Upload an image file to use as input for the API (image URL) |
| aspect_ratio | string | Yes | Width-height ratio of the image, determining its visual form. (options: 1:1 \| 4:3 \| 3:4 \| 16:9 \| 9:16 \| 2:3 \| 3:2) (default: 1:1) |
| quality | string | Yes | Basic outputs 1K images, while High outputs 2K images. (options: basic \| high) (default: basic) |

### Request example

```json
{
  "modelId": "seedream-5-pro-image-to-image",
  "input": {
    "prompt": "Create a premium 3:4 editorial infographic poster titled exactly:\n\n“THE ANATOMY OF A HIT”\n\nHero visual: one gigantic transparent cassette tape shown in dramatic three-quarter perspective, occupying most of the frame. The cassette is sliced open like a precision architectural cutaway. Inside it is a photorealistic sold-out concert: a tiny performer on a blazing stage, thousands of fans, lighting trusses, speakers, backstage corridors and a control booth integrated naturally into the cassette mechanism.\n\nThe two tape reels become circular concert zones; magnetic tape transforms into a glowing red waveform winding through the structure.\n\nUse strong near-far depth, intentional cropping and asymmetry. One corner of the cassette extends beyond the frame. Dark foreground, illuminated interior, deep black negative space.\n\nAdd precise editorial labels with thin leader lines:\n\n“18,400 FANS”\n“92 MIN SET”\n“24 LIGHTING CUES”\n“128 BPM”\n“01:37 PEAK ENERGY”\n\nLabel key areas:\n“STAGE”\n“CROWD”\n“FOH”\n“BACKSTAGE”\n“SOUND”\n\nSmall footer:\n“ONE NIGHT / ONE SONG / ONE MEMORY”\n\nTypography: bold condensed headline, compact technical labels, sharp hierarchy, clean spacing. Do not let information overpower the hero object.\n\nColor system: deep black, transparent smoked acrylic, vivid signal red, warm amber skin light, sharp white stage beams.\n\nMaterials must feel physically real: scratched cassette plastic, metal screws, magnetic tape, fingerprints, condensation, concert haze and realistic lighting.\n\nThe result should feel like an award-winning music magazine cover crossed with a museum cutaway and a global festival campaign — tactile, intelligent, strange, energetic and instantly readable.",
    "image_urls": [
      "https://you.bot/examples/grok-imagine-text-to-image.jpg"
    ],
    "aspect_ratio": "1:1",
    "quality": "basic"
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 4.09
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=seedream-5-pro-image-to-image`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed — check API Key |
| 402 | Insufficient account balance |
| 403 | IP not allowed for this key, or the key is restricted to other models |
| 404 | Task not found, or it has expired |
| 409 | Duplicate request — an identical submit arrived moments ago. Nothing was charged; retry is safe |
| 413 | Payload too large — see the character and file-size limits for this model |
| 429 | Rate limit exceeded — retry after the Retry-After header |
| 500 | Internal server error |
| 504 | Upstream timed out — nothing was delivered; retry is safe |
