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

# Text to Image

> Generate images from text using ByteDance Seedream models via Volcengine Ark. Supports up to 4K resolution and multi-image input.

## Body Parameters

<ParamField body="model" type="string" required>
  Seedream model. Options:

  * `seedream-5-0-lite` — Latest, web search support, \$0.04/image
  * `seedream-4-5` — Flagship, multi-image input, streaming, \$0.04/image
  * `seedream-4-0` — Multi-image input, \$0.03/image
  * `seedream-3-0-t2i` — Text-to-image only, seed & guidance control, \$0.03/image
</ParamField>

<ParamField body="input" type="object" required>
  Input parameters for the generation.

  <Expandable title="properties">
    <ParamField body="prompt" type="string" required>
      Text description of the image to generate. Supports Chinese and English.

      **Recommended limits:** 300 Chinese characters or 600 English words.
    </ParamField>

    <ParamField body="size" type="string" default="2K">
      Output image size. Options:

      **Presets:**

      * `1K` — 1024x1024
      * `2K` — 2048x2048 (default for 4.0/4.5/5.0)
      * `3K` — 3072x3072 (5.0 only)
      * `4K` — 4096x4096 (4.0/4.5 only)

      **Custom:** `WxH` in pixels (e.g., `1920x1080`), 128-aligned.

      * **4.0**: Total pixels (w×h) in \[921,600 \~ 16,777,216], aspect ratio \[1:16 \~ 16:1]
      * **4.5**: Total pixels (w×h) in \[3,686,400 \~ 16,777,216], aspect ratio \[1:16 \~ 16:1]
      * **3.0-t2i**: Range \[512x512, 2048x2048], 64-aligned, default 1024x1024
    </ParamField>

    <ParamField body="width" type="number">
      Image width in pixels (alternative to `size`). Must satisfy total pixel and aspect ratio constraints above. 128-aligned.
    </ParamField>

    <ParamField body="height" type="number">
      Image height in pixels (alternative to `size`). Must satisfy total pixel and aspect ratio constraints above. 128-aligned.
    </ParamField>

    <ParamField body="seed" type="number" default={-1}>
      **Seedream 3.0 only.** Random seed for reproducibility. Range: `-1` to `2147483647`. `-1` means random.
    </ParamField>

    <ParamField body="guidance_scale" type="number">
      **Seedream 3.0 only.** How closely to follow the prompt. Range: `1` to `10`.
    </ParamField>

    <ParamField body="watermark" type="boolean" default={true}>
      Whether to add a watermark to the generated image.
    </ParamField>

    <ParamField body="optimize_prompt" type="string">
      Prompt optimization mode. Enhances the prompt for better generation results.

      * **Seedream 4.0/4.5**: Options: `standard`, `fast`
      * **Seedream 5.0**: Only supports `standard`
    </ParamField>

    <ParamField body="output_format" type="string">
      **Seedream 5.0 only.** Output image format. Options: `png`, `jpeg`.
    </ParamField>

    <ParamField body="web_search" type="boolean">
      **Seedream 5.0 only.** Enable real-time web search to enhance generation with up-to-date information.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="webhookUrl" type="string">
  URL to receive a webhook when the task completes.
</ParamField>

<ParamField body="metadata" type="object">
  Custom key-value metadata to attach to the task.
</ParamField>

<ResponseExample>
  ```json 202 theme={null}
  {
    "success": true,
    "data": {
      "id": "task_abc123",
      "status": "pending",
      "type": "text-to-image",
      "provider": "seedream",
      "model": "seedream-4-5",
      "created_at": "2026-01-15T10:00:00Z",
      "estimated_seconds": 10
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request parameters"
    }
  }
  ```
</ResponseExample>
