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

# Seedream 5.5 Pro · Parameters and pricing

> Seedream 5.5 Pro authentication, shared parameters, response fields, pricing, and errors

## Introduction

Shared model reference. For copyable requests, choose a scenario: [Text to image](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/generations.md) · [Image to image](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md)

## Authentication

**Authorization** `string` *required*

Bearer sk-xxxxxxxxxx

**Content-Type** `string` *required*

application/json

Create an API Key in the platform API key page. Do not embed keys in frontend code, public repositories, or client packages.

## Model information

| Item | Description |
| - | - |
| Model ID | `dola-seedream-5-5-261028` |
| Text to image | Supported |
| Single-image editing | Supported |
| Multi-image reference / fusion | Up to 10 reference images |
| Interactive editing | Coordinates, bounding boxes, arrows, and sketches |
| Transparent images (RGBA) | Text-to-image and image-to-image |
| Layer decomposition | One base image + up to 99 layers |
| Rich-text OCR | Layer decomposition only |
| Prompt optimization | `standard` |
| Prompt languages | Chinese, English, Russian, Arabic, Filipino, Thai, Turkish, Korean, Malay, Spanish, Portuguese, Indonesian, French, German, Vietnamese, Japanese |
| Sequential generation / web search / streaming | Not supported |
| Images per request | One, except for layer decomposition |
| Response mode | Synchronous |

## Endpoints

```http theme={null}
POST https://api.gravitex.ai/v1/images/generations
```

`POST https://api.gravitex.ai/v1/images/edits` is equivalent and accepts the same JSON body. Both routes are forwarded to the same upstream image endpoint.

## Request parameters

| Parameter | Type | Required | Default | Description |
| - | - | - | - | - |
| `model` | string | Yes | - | `dola-seedream-5-5-261028` |
| `prompt` | string | Generation/editing: yes; decomposition: optional | - | Generation or editing instruction; specify elements to separate for decomposition |
| `image` | string / string\[] | Required for editing and decomposition | - | Reference URL or Base64; omit for text-to-image |
| `size` | string | No | Generation/editing: `2K`; decomposition: `auto` | [Resolution tier or custom size](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5.md#size) |
| `optimize_prompt_options` | object | No | `{"mode":"standard"}` | Only `standard` is supported |
| `output_format` | string | No | `png` | `jpeg` / `png`; in decomposition, controls the base image only. Layers are always PNG. |
| `background` | string | No | `auto` | `auto` / `transparent` / `opaque` |
| `response_format` | string | No | `url` | `url` (valid for 24 hours) or `b64_json` |
| `watermark` | boolean | No | `true` | Add an AI-generated watermark in the bottom-right corner |
| `layer_decomposition` | boolean | No | `false` | [Enable layer decomposition](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md#layer_decomposition) |
| `layer_decomposition_options` | object | No | - | [Decomposition configuration; active only when decomposition is enabled](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md#layer_decomposition_options) |
| `safety_identifier` | string | No | - | Stable, unique end-user identifier; English string, at most 64 characters. Prefer a hash of a username, ID, or email to protect privacy. Returned unchanged if provided. |
| `n` | integer | No | `1` | Compatibility field: omit or use `1` for ordinary generation. Decomposition counts follow its own limits. |

> [!WARNING]
>
> Do not pass `quality`, `sequential_image_generation`, `sequential_image_generation_options`, `stream`, or `tools`. These models do not support sequential image generation, streaming, or web search. Control resolution with `size`.

### prompt

Required for generation and editing; optional for decomposition. Keep Chinese prompts within 300 characters and English prompts within 600 words. Interactive editing: [Image to image](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md#prompt)

### image

[Reference formats and limits](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md#image)

### size

For generation and ordinary editing, use one of these formats:

* Resolution tier: `1K`, `1.5K`, or `2K` (default). Describe the desired aspect ratio or use in the prompt.
* Custom `WIDTHxHEIGHT`: use a lowercase `x`. Total pixels must be within `[921600, 4624220]` and width/height within `[1/16, 16]`.

| Example | Valid | Reason |
| - | - | - |
| `2880x1440` | Yes | 4,147,200 pixels; aspect ratio 2 |
| `1024x1024` | Yes | 1,048,576 pixels |
| `512x512` | No | 262,144 pixels, below 921,600 |

Layer decomposition accepts only `1K`, `1.5K`, `2K`, or `auto` (default), not custom pixel dimensions. The base image follows `size` and the original aspect ratio; each layer is close to the selected resolution tier and retains its own aspect ratio. With `auto`, use the original size, clamped to the 1K–2K range while preserving aspect ratio.

Typical dimensions for each tier (not exhaustive):

| Aspect ratio | 1K | 1.5K | 2K |
| - | - | - | - |
| 1:1 | 1024x1024 | 1536x1536 | 2048x2048 |
| 4:3 | 1152x864 | 1792x1344 | 2368x1776 |
| 3:4 | 864x1152 | 1344x1792 | 1776x2368 |
| 16:9 | 1424x800 | 2048x1152 | 2816x1584 |
| 9:16 | 800x1424 | 1152x2048 | 1584x2816 |
| 3:2 | 1248x832 | 1872x1248 | 2496x1664 |
| 2:3 | 832x1248 | 1248x1872 | 1664x2496 |
| 21:9 | 1568x672 | 2352x1008 | 3136x1344 |

### optimize\_prompt\_options

Use `{"optimize_prompt_options":{"mode":"standard"}}`.

### background

[Requirements and examples](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/generations.md#background)

### layer\_decomposition

[Requirements and examples](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md#layer_decomposition)

### layer\_decomposition\_options

[Requirements and examples](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md#layer_decomposition_options)

### safety\_identifier

Use a stable, unique English string of at most 64 characters. A hash of the user ID or email is recommended. The response echoes the value when supplied.

## Success response

Ordinary generation returns one image. Input image usage reflects the actual input count. URLs below illustrate the response structure only.

```json theme={null}
{
  "model": "dola-seedream-5-5-261028",
  "created": 1784868948,
  "data": [
    {
      "url": "https://example.com/generated-image.png",
      "size": "2048x2048",
      "output_format": "png",
      "background": "opaque"
    }
  ],
  "usage": {
    "input_images": 0,
    "generated_images": 1,
    "output_tokens": 16384,
    "total_tokens": 16384
  }
}
```

### Response fields

| Field | Type | Description |
| - | - | - |
| `model` | string | Actual model ID |
| `created` | integer | Unix timestamp in seconds |
| `data` | array | One image for ordinary generation; base image and layers for decomposition |
| `data[].url` | string | Image URL, valid for 24 hours; returned with `response_format: "url"` |
| `data[].b64_json` | string | Base64 image data with `response_format: "b64_json"` |
| `data[].size` | string | Actual pixel dimensions, such as `2048x2048` |
| `data[].output_format` | string | Actual format, `jpeg` / `png`; layers are always PNG |
| `data[].background` | string | Actual transparency: `transparent` or `opaque` |
| `safety_identifier` | string | Echoed if present in the request |
| `usage.input_images` | integer | Number of input reference images |
| `usage.generated_images` | integer | Successful outputs used for billing, including the base image and all layers |
| `usage.output_tokens` | integer | Output tokens: integer value of `sum(width × height) / 256` |
| `usage.total_tokens` | integer | Currently equals output tokens; input tokens are not counted |
| `error.code` / `error.message` | string | Returned when no image is generated |

[Additional layer/OCR fields and layer reconstruction](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.5/edits.md#response-fields)

Download and persist URL results within 24 hours.

## Pricing

**Formula**: reference-image charges + the sum of per-output charges at each output image pixel tier.

| Item | Tier | USD / image |
| - | - | - |
| Reference image | Every image, including the first | 0.008 |
| Image generation output | ≤ 2.61 million pixels | 0.020 |
| Image generation output | > 2.61 million pixels | 0.035 |
| Decomposition output | ≤ 2.61 million pixels | 0.020 |
| Decomposition output | > 2.61 million pixels | 0.035 |

* These are official base prices. Actual charges apply the token group multiplier; consult the model marketplace.
* Only successfully generated images are billed. Images rejected by moderation or otherwise not generated are not charged.
* The base image and each layer count as separate output images; each uses its own actual pixel tier.

Unlike 5.0 Pro, decomposition outputs have no discount. At most 100 images can be returned with `max_images`; choose a suitable limit for your budget.

**Examples**:

* Two references + one 2048×2048 output: `2 × 0.008 + 0.035 = 0.051 USD`.
* One reference + one 2048×2048 base image + six layers of 1K or less: `0.008 + 0.035 + 6 × 0.020 = 0.163 USD`.

## Error handling

Failed requests return a JSON error object:

```json theme={null}
{
  "error": {
    "message": "Error description",
    "type": "invalid_request_error",
    "code": "InvalidParameter"
  }
}
```

| Issue | Action |
| - | - |
| Invalid API Key | Check `Authorization: Bearer ...` |
| Missing prompt | Provide a non-empty `prompt` for generation and editing |
| Reference image cannot be read | Check public URL access and expiry, or the `data:image/<format>;base64,` prefix |
| Unsupported size | Use `1K` / `1.5K` / `2K`, or custom dimensions with 921600–4624220 total pixels |
| Decomposition error | Use one PNG/JPEG image of at least 512×512 total pixels; omit `background` |
| Transparency error | Use PNG output; 5.0 Pro additionally requires one reference image with an alpha channel |
| Unsupported parameters | Remove unsupported fields listed above |
| Multiple ordinary outputs | Send separate requests |
| Expired result URL | Download and persist results immediately |
| `max_images` | Use a value in `[2, 100]` |
| `optimize_prompt_options.mode` | Only `standard` is supported |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.