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

> Dola Seedream 5.0 Pro text-to-image, image-to-image, and multi-image reference

## Introduction

Seedream 5.0 Pro (model `dola-seedream-5-0-pro-260628`) supports text-to-image, single-image editing, and multi-image reference / fusion. It uses the OpenAI-compatible image generation API with synchronous responses. Each request currently returns **1** image.

Multiple reference images mean multiple **inputs**, not multiple outputs. To get multiple results, send multiple requests.

See also [Image generation](/en/api-reference/endpoint/image-generation) for multi-model comparison.

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer Token, e.g. `Bearer sk-xxxxxxxxxx`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

Create an API Key in the platform console. Do not embed keys in frontend code, public repos, or client packages.

## Model info

| Item                           | Description                        |
| ------------------------------ | ---------------------------------- |
| Model ID                       | `dola-seedream-5-0-pro-260628`     |
| Text-to-image                  | Supported                          |
| Single-image edit              | Supported                          |
| Multi-image reference / fusion | Supported                          |
| Outputs per request            | Currently 1                        |
| Protocol                       | OpenAI-compatible image generation |
| Response mode                  | Synchronous                        |

## Endpoint

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

## Request parameters

| Parameter         | Type      | Required | Description                                                     |
| ----------------- | --------- | -------- | --------------------------------------------------------------- |
| `model`           | string    | Yes      | Must be `dola-seedream-5-0-pro-260628`                          |
| `prompt`          | string    | Yes      | Generation or edit instruction                                  |
| `size`            | string    | No       | Output size: `1K`, `2K`, or `WIDTHxHEIGHT` (e.g. `1024x1024`)   |
| `images`          | string\[] | No       | Reference image URL array; omit for text-to-image               |
| `n`               | integer   | No       | Requested count; this model currently returns 1 image — use `1` |
| `quality`         | string    | No       | Image quality; use `standard`                                   |
| `output_format`   | string    | No       | `jpeg` or `png`, default `jpeg`                                 |
| `response_format` | string    | No       | `url` or `b64_json`, default `url`                              |
| `watermark`       | boolean   | No       | Add watermark when `true`; default `false`                      |

### prompt

Required text instruction describing the desired output. For image-to-image, also describe how to use or modify the reference images.

```json theme={null}
"prompt": "Futuristic city nightscape, movie poster style, high detail, blue-purple neon"
```

### images

Pass one or more image URLs reachable by the platform:

```json theme={null}
"images": [
  "https://example.com/reference-1.png"
]
```

Multi-image example:

```json theme={null}
"images": [
  "https://example.com/subject.png",
  "https://example.com/style.jpeg"
]
```

<Note>
  * URLs must be server-accessible (not only valid in a local browser).
  * Multiple images are for reference / fusion / editing; output is still one image.
  * Current test and production calls use the `images` array field.
  * Format, size, count, and accessibility must satisfy upstream model limits.
</Note>

### size

Supports resolution tiers or custom pixel sizes:

```json theme={null}
"size": "1K"
```

```json theme={null}
"size": "2K"
```

```json theme={null}
"size": "1024x1024"
```

Common sizes:

| Requested size | Typical output |
| -------------- | -------------- |
| `1024x1024`    | `1024x1024`    |
| `2048x2048`    | `2048x2048`    |

## Request examples

<Tabs>
  <Tab title="Text-to-image">
    ```bash theme={null}
    curl --location 'https://api.gravitex.ai/v1/images/generations' \
      --header 'Authorization: Bearer sk-xxxxxxxxxx' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "dola-seedream-5-0-pro-260628",
        "prompt": "Futuristic city nightscape, movie poster style",
        "size": "1024x1024",
        "n": 1
      }'
    ```
  </Tab>

  <Tab title="Image-to-image">
    ```bash theme={null}
    curl --location 'https://api.gravitex.ai/v1/images/generations' \
      --header 'Authorization: Bearer sk-xxxxxxxxxx' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "dola-seedream-5-0-pro-260628",
        "prompt": "Generate a black lamb based on the reference image",
        "size": "1024x1024",
        "n": 1,
        "images": [
          "https://example.com/reference.png"
        ]
      }'
    ```
  </Tab>

  <Tab title="Multi-image fusion">
    ```bash theme={null}
    curl --location 'https://api.gravitex.ai/v1/images/generations' \
      --header 'Authorization: Bearer sk-xxxxxxxxxx' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "dola-seedream-5-0-pro-260628",
        "prompt": "Fuse two reference images into a black-and-white lamb",
        "size": "1024x1024",
        "n": 1,
        "images": [
          "https://example.com/reference-1.png",
          "https://example.com/reference-2.jpeg"
        ]
      }'
    ```
  </Tab>

  <Tab title="PNG output">
    ```bash theme={null}
    curl --location 'https://api.gravitex.ai/v1/images/generations' \
      --header 'Authorization: Bearer sk-xxxxxxxxxx' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "dola-seedream-5-0-pro-260628",
        "prompt": "Minimal product promo image",
        "size": "2K",
        "output_format": "png",
        "watermark": false
      }'
    ```
  </Tab>
</Tabs>

## Success response

The platform returns an OpenAI-compatible image generation result:

```json theme={null}
{
  "model": "dola-seedream-5-0-pro-260628",
  "created": 1784868948,
  "data": [
    {
      "url": "https://example.com/generated-image.jpeg",
      "size": "1024x1024",
      "output_format": "jpeg"
    }
  ],
  "usage": {
    "input_images": 0,
    "generated_images": 1,
    "output_tokens": 4096,
    "total_tokens": 4096
  }
}
```

### Response fields

| Field                    | Type    | Description                                |
| ------------------------ | ------- | ------------------------------------------ |
| `model`                  | string  | Model actually used                        |
| `created`                | integer | Creation time (Unix timestamp)             |
| `data`                   | array   | Output images; usually one item            |
| `data[].url`             | string  | Image URL — download promptly              |
| `data[].b64_json`        | string  | Base64 image content when using `b64_json` |
| `data[].size`            | string  | Actual output pixel size                   |
| `data[].output_format`   | string  | Actual output format                       |
| `usage.input_images`     | integer | Number of input reference images           |
| `usage.generated_images` | integer | Number of generated images                 |
| `usage.output_tokens`    | integer | Output token usage                         |
| `usage.total_tokens`     | integer | Total token usage                          |

<Warning>
  `data[].url` is typically temporary. Download and persist to your own storage immediately after receiving the response.
</Warning>

## Multiple images

This model currently returns only 1 image per request. The following request can pass 2 reference images, but the result is still 1 image:

```json theme={null}
{
  "model": "dola-seedream-5-0-pro-260628",
  "prompt": "Fuse two reference images into one new image",
  "images": [
    "https://example.com/a.png",
    "https://example.com/b.png"
  ],
  "n": 1
}
```

For 3 independent results, send 3 requests instead of relying on `n: 3`:

```text theme={null}
Request 1: n=1
Request 2: n=1
Request 3: n=1
```

## Error handling

Failed requests usually return a JSON error object:

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

Common issues:

| Issue                      | Suggestion                                           |
| -------------------------- | ---------------------------------------------------- |
| Invalid API Key            | Check `Authorization: Bearer ...`                    |
| Missing `prompt`           | Provide a non-empty `prompt`                         |
| Reference image unreadable | Ensure the URL is publicly reachable and not expired |
| Unsupported size           | Use `1K`, `2K`, or a custom size within model limits |
| Unsupported parameters     | Remove unsupported fields and retry                  |
| Want multiple outputs      | Send multiple `n=1` requests                         |
| URL expired                | Download and persist immediately after the response  |
