> ## 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 · Text to image

> Seedream 5.0 Pro Text to image parameters, limits, and copyable examples

## Introduction

Provide a prompt to generate one image; omit `image`. Text-only transparent output is not supported. [For reference-based editing, fusion, and decomposition, see image-to-image.](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0/edits.md)

## Endpoint and authentication

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

Use `Authorization: Bearer sk-xxxxxxxxxx` and `Content-Type: application/json`. [Parameters and pricing](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0.md#authentication)

## Request parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | `dola-seedream-5-0-pro-260628` |
| `prompt` | string | Yes | Describe the image to generate; keep Chinese prompts within 300 characters and English prompts within 600 words |
| `size` | string | No | Default `2K`; `1K`, `1.5K`, `2K`, or custom `WIDTHxHEIGHT` |
| `output_format` | string | No | Default: `jpeg`. `jpeg` / `png`; use PNG for transparent output. |
| `response_format` | string | No | Default: `url`. `url` (valid for 24 hours) or `b64_json` |
| `watermark` | boolean | No | Default: `true`. Add an AI-generated watermark in the bottom-right corner |
| `optimize_prompt_options` | object | No | Default: `{"mode":"standard"}`. `mode`: `standard` (higher quality, slower) or `fast` (faster, slightly lower quality) |

For ordinary generation, omit `n` or use `1`; send separate requests for multiple results. See [shared parameters](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0.md#request-parameters) for full defaults and `safety_identifier`. Neither model supports `quality`, sequential generation, streaming, or web search.

### size

[Full size rules and dimension table](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0.md#size)

Default `2K`. Use `1K`, `1.5K`, `2K`, or custom `WIDTHxHEIGHT`. Custom total pixels: `[921600, 4624220]`; aspect ratio: `[1/16, 16]`. `1024x1024` is valid; `512x512` is not.

> [!NOTE]
>
> [5.0 Pro requires an alpha reference for transparent editing; see image-to-image.](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0/edits.md#background)

## Request examples

Each example includes a complete JSON body and matching cURL. Replace `sk-xxxxxxxxxx` with your API Key.

### Text to image

```json Request body theme={null}
{
  "model": "dola-seedream-5-0-pro-260628",
  "prompt": "Futuristic city at night, movie poster style, 16:9 landscape",
  "size": "2K",
  "watermark": false
}
```

```bash cURL 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 at night, movie poster style, 16:9 landscape",
    "size": "2K",
    "watermark": false
  }'
```

### Prompt optimization

```json Request body theme={null}
{
  "model": "dola-seedream-5-0-pro-260628",
  "prompt": "Futuristic city at night, movie poster style",
  "optimize_prompt_options": {
    "mode": "fast"
  },
  "safety_identifier": "5f4dcc3b5aa765d61d8327deb882cf99"
}
```

```bash cURL 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 at night, movie poster style",
    "optimize_prompt_options": {
      "mode": "fast"
    },
    "safety_identifier": "5f4dcc3b5aa765d61d8327deb882cf99"
  }'
```

## Success response

Read `data[].url` and save within 24 hours, or decode `data[].b64_json` when using `response_format: "b64_json"`. [Response example, fields, and usage](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0.md#success-response)

## Pricing and errors

Text-to-image has no reference-image charge; each output uses its actual pixel tier.

[Pricing](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0.md#pricing) · [Error handling](https://docs.gravitex.ai/en/api-reference/endpoint/seedream-5.0.md#error-handling)


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