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

# Seedream 5.0 Pro Image-to-Image

> Supported models include `dola-seedream-5-0-pro-260628`. This document covers Image-to-Image, Multi-Image Reference Generation, and Layer Decomposition scenarios. Public fields include `model`, `prompt`, `image`, `size`, `background`, `layer_decomposition`, `response_format`, and `watermark`.

**Model Capabilities**
- Generate single image (does not support sequential_image_generation)
- Layer decomposition: Supports decomposing a single image into one base image and multiple output layers, with up to 16 layers.
- Interactive editing: Supports specifying edit locations in multiple ways, such as coordinates, selection boxes, and arrows, for precise image editing.
- Multi-Image Reference Generation: Input multiple reference images (2-10) + text prompt to generate a single image.
- Single Image Generation: Input a single reference image + text prompt to generate a single image.
- Sequential image generation, web search, and streaming output are not supported.



## OpenAPI

````yaml api-reference/en/zmodelImage/byteplus/seedream-5-0-pro-image-to-image.json POST /v1/images/generations
openapi: 3.0.1
info:
  title: Seedream 5.0 Pro Image-to-Image
  version: 1.0.0
  description: >-
    Seedream 5.0 pro Image-to-Image, multi-image reference, and layer
    decomposition capability documentation. The public unified endpoint is
    `/v1/images/generations`.
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API service endpoint
security: []
tags:
  - name: Seedream Image
    description: Seedream series image generation capabilities
paths:
  /v1/images/generations:
    post:
      tags:
        - Seedream Image
      summary: Seedream 5.0 Pro Image-to-Image
      description: >-
        Supported models include `dola-seedream-5-0-pro-260628`. This document
        covers Image-to-Image, Multi-Image Reference Generation, and Layer
        Decomposition scenarios. Public fields include `model`, `prompt`,
        `image`, `size`, `background`, `layer_decomposition`, `response_format`,
        and `watermark`.


        **Model Capabilities**

        - Generate single image (does not support sequential_image_generation)

        - Layer decomposition: Supports decomposing a single image into one base
        image and multiple output layers, with up to 16 layers.

        - Interactive editing: Supports specifying edit locations in multiple
        ways, such as coordinates, selection boxes, and arrows, for precise
        image editing.

        - Multi-Image Reference Generation: Input multiple reference images
        (2-10) + text prompt to generate a single image.

        - Single Image Generation: Input a single reference image + text prompt
        to generate a single image.

        - Sequential image generation, web search, and streaming output are not
        supported.
      operationId: byteplusImageToImage50Pro
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageToImageRequest'
            examples:
              image_to_image:
                summary: Basic Image-to-Image
                value:
                  model: dola-seedream-5-0-pro-260628
                  prompt: Convert the image to Studio Ghibli animation style
                  image: https://example.com/input.jpg
                  size: 2K
              multi_image_reference:
                summary: Multi-Image Reference Generation
                value:
                  model: dola-seedream-5-0-pro-260628
                  prompt: >-
                    Combine the styles of these images to generate a new
                    landscape
                  image:
                    - https://example.com/ref1.jpg
                    - https://example.com/ref2.jpg
                  size: 2K
              layer_decomposition:
                summary: Layer Decomposition
                value:
                  model: dola-seedream-5-0-pro-260628
                  prompt: >-
                    Decompose the main subject and background into separate
                    layers
                  image: https://example.com/input.png
                  size: auto
                  layer_decomposition: true
      responses:
        '200':
          description: Success, returns the image generation result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_request:
                  summary: Invalid Parameters
                  value:
                    error:
                      message: Request body format error or invalid field values
                      type: invalid_request_error
                      code: bad_request_body
                      param: ''
        '401':
          description: Authentication failed, e.g., token not provided or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Unauthorized
                  value:
                    error:
                      message: Invalid token
                      type: api_error
                      code: access_denied
                      param: ''
        '429':
          description: Rate limit exceeded or insufficient account quota.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                quota_exceeded:
                  summary: Quota Exceeded or Rate Limited
                  value:
                    error:
                      message: Insufficient account quota, please try again later
                      type: api_error
                      code: insufficient_user_quota
                      param: ''
        '500':
          description: Internal server error occurred during request processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Internal Processing Failed
                  value:
                    error:
                      message: >-
                        Internal service processing failed, please try again
                        later
                      type: api_error
                      code: gen_relay_info_failed
                      param: ''
      security:
        - BearerAuth: []
components:
  schemas:
    ImageToImageRequest:
      type: object
      required:
        - model
        - prompt
        - image
      properties:
        model:
          type: string
          enum:
            - dola-seedream-5-0-pro-260628
          description: >-
            Image generation model name. Supported models include
            `dola-seedream-5-0-pro-260628` (Seedream 5.0 pro, supports
            interactive editing and layer decomposition, does not support
            sequential image generation).
        prompt:
          type: string
          description: >-
            Prompt for image generation or intended layer decomposition,
            supports Chinese and English. It is recommended not to exceed 300
            Chinese characters or 600 English words. Too many words may disperse
            information, causing the model to ignore details and focus only on
            key points, resulting in missing elements in the image.


            - **Image generation scenario (Required)**: Describes the content to
            generate.

            - **Layer decomposition scenario (Optional)**: Specifies the
            intended layer decomposition. If omitted, the model automatically
            decomposes all major elements into separate layers.
          example: >-
            Dynamic close-up editorial portrait with sharp gaze, sculptural hat,
            rich color blocking.
        image:
          oneOf:
            - type: string
              description: Input image information, supports URL or Base64 encoding.
            - type: array
              description: >-
                Input multiple image information, supports URL or Base64
                encoding.
              items:
                type: string
              maxItems: 10
          description: >-
            Input image information, supports URL or Base64 encoding.


            - **Image URL**: Ensure the image URL is accessible.

            - **Base64 encoding**: Follow the format
            `data:image/<image_format>;base64,<Base64_encoded>`. Note that
            `<image_format>` must be lowercase, e.g.,
            `data:image/png;base64,<base64_image>`.


            **Image generation scenario (Optional)**:

            - Seedream 5.0 pro supports up to 10 reference images.

            - Single-image input requirements:
              - Format: jpeg, png, webp, bmp, tiff, gif, heic, or heif
              - Aspect ratio (width / height): [1/16, 16]
              - Width and height (px): > 14
              - Size: Up to 30 MB
              - Total pixels: [196, `6000×6000` (36,000,000)]. Limit on the product of width and height.

            **Layer decomposition scenario (Required)**:

            - When layer decomposition is enabled (`layer_decomposition` is
            `true`), `image` is required and supports only a single image.
            Passing multiple images causes an error.

            - Single-image input requirements:
              - Format: png or jpeg
              - Aspect ratio: [1/16, 16]
              - Size: Up to 30 MB
              - Total pixels: [`512×512` (262,144), `6000×6000` (36,000,000)].
        size:
          type: string
          description: >-
            Specifies the dimensions of the generated image. Configuration
            methods and options vary by scenario:


            **Image generation scenario**

            Two methods are available, but they cannot be used at the same time:


            * **Method 1 (Recommended)**: Specify the resolution level of the
            generated image, and describe its aspect ratio, shape, or purpose in
            the prompt using natural language. The model determines the final
            image size.
              * Default: `auto`
              * Available values: `1K`, `1.5K`, `2K`
              * *Pricing note*: `1.5K` has the same price as `1K` while providing better image generation quality.

            * **Method 2**: Specify the width and height of the generated image
            in pixels (`widthxheight`):
              * Total pixels range: [`1280x720` (921,600), `2048x2048x1.1025` (4,624,220)]
              * Aspect ratio range: [1/16, 16]
              * *Note*: When using Method 2, both the total pixel range and aspect ratio range must be satisfied. The total pixel limit applies to the product of width and height.
                * Valid example: `2048x1024` (Total pixels 2048x1024=2,097,152; aspect ratio 2)
                * Invalid example: `512x512` (Total pixels 512x512=262,144, below 921,600 minimum)

            **Resolution to Pixel Reference Values (Method 1)**:


            | Resolution | Aspect Ratio | Width and Height Pixel Values |

            |---|---|---|

            | 1K | 1:1 | 1024x1024 |

            | | 4:3 | 1152x864 |

            | | 3:4 | 864x1152 |

            | | 16:9 | 1424x800 |

            | | 9:16 | 800x1424 |

            | | 3:2 | 1248x832 |

            | | 2:3 | 832x1248 |

            | | 21:9 | 1568x672 |

            | 1.5K | 1:1 | 1536x1536 |

            | | 4:3 | 1792x1344 |

            | | 3:4 | 1344x1792 |

            | | 16:9 | 2048x1152 |

            | | 9:16 | 1152x2048 |

            | | 3:2 | 1872x1248 |

            | | 2:3 | 1248x1872 |

            | | 21:9 | 2352x1008 |

            | 2K | 1:1 | 2048x2048 |

            | | 4:3 | 2368x1776 |

            | | 3:4 | 1776x2368 |

            | | 16:9 | 2816x1584 |

            | | 9:16 | 1584x2816 |

            | | 3:2 | 2496x1664 |

            | | 2:3 | 1664x2496 |

            | | 21:9 | 3136x1344 |


            **Layer decomposition scenario**

            Only resolution levels are supported:

            * **Base image**: Output resolution is consistent with the
            resolution specified by `size`, keeping the original aspect ratio.

            * **Layers**: Each output layer resolution is close to the
            resolution specified by `size`, keeping the aspect ratio of its
            region.

            * Default: `auto`

            * Supported values: `1K`, `1.5K`, `2K`, `auto`

            * **`auto` adaptation rules**:
              * If original dimensions of base image and each layer are between [`1280x720` (921,600), `2048x2048x1.1025` (4,624,220)], output at original dimensions.
              * If smaller than 1K, output at 1K.
              * If larger than 2K, output at 2K.
          default: auto
          example: auto
          x-enum:
            - 1K
            - 1.5K
            - 2K
            - auto
        background:
          type: string
          enum:
            - opaque
            - transparent
          description: >-
            Controls whether to generate an image with an alpha channel. Valid
            values:

            - `opaque`: Opaque background mode (default). The output image has a
            standard, opaque background.

            - `transparent`: Transparent background mode. The output image has a
            transparent background.


            **Usage restrictions**:

            - Supported only for image-to-image generation with exactly one
            input image that has an alpha channel.

            - In transparent background mode, the output image format defaults
            to `png`. If `output_format` is set to `jpeg`, the request returns
            an error.

            - If the input image uses a format that does not support an alpha
            channel (such as `jpeg`), the request returns an error.


            **Supported model**: `dola-seedream-5-0-pro-260628` (Seedream 5.0
            pro).
          default: opaque
        layer_decomposition:
          type: boolean
          description: >-
            Controls whether to enable layer decomposition. Layer decomposition
            automatically decomposes subjects, backgrounds, text, and other
            content in a single image into one base image and up to 16
            independently editable layers. Each layer is a PNG image with an
            alpha channel.

            - `true`: Layer decomposition mode. The model decomposes the input
            image into one base image and multiple layers.

            - `false`: Image generation mode (default). Layer decomposition is
            not performed.


            **Usage notes**:

            - Only one image to be decomposed is supported. Passing multiple
            images causes an error.

            - If any layer fails to generate, the entire request fails. Partial
            success is not supported.

            - If the prompt requests more layers than the upper limit (16), some
            layer information may be lost.

            - The `data` response object returns the position and content
            information of each output layer, including layer order (`z_index`),
            bounding box information (`bounding_box`), name (`name`), and
            description (`description`).


            **Supported model**: `dola-seedream-5-0-pro-260628` (Seedream 5.0
            pro).
          default: false
        response_format:
          type: string
          enum:
            - url
            - b64_json
          description: >-
            Specifies how generated images are returned. Supported options:

            - `url`: Returns a download URL for the image; valid for 24 hours
            after generation.

            - `b64_json`: Returns image data as a Base64-encoded string in JSON.
          default: url
        watermark:
          type: boolean
          description: >-
            Controls whether to add a watermark to the generated image.

            - `false`: Does not add a watermark.

            - `true`: Adds an "AI-generated" watermark in the lower-right corner
            of the image.
          default: true
    ImageGenerationResponse:
      type: object
      properties:
        model:
          type: string
          description: Model ID (model name-version) used for this request.
        created:
          type: integer
          format: int64
          description: Unix timestamp (seconds) of creation.
        data:
          type: array
          items:
            $ref: '#/components/schemas/ImageData'
          description: >-
            List of generated images. In layer decomposition, includes base
            image and decomposed layers.
        usage:
          type: object
          description: Usage information for this request.
          properties:
            generated_images:
              type: integer
              description: Number of successfully generated images, excluding failed ones.
            input_images:
              type: integer
              description: Number of images input to the model.
            output_tokens:
              type: integer
              description: Token count for generated images.
            total_tokens:
              type: integer
              description: Total token count for this request.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
    ImageData:
      type: object
      properties:
        url:
          type: string
          description: Image download URL. Valid for 24 hours, please save promptly.
        b64_json:
          type: string
          description: Base64 encoded image data.
        size:
          type: string
          description: Image dimensions (widthxheight).
        output_format:
          type: string
          description: >-
            Output image format (`png` or `jpeg`). In layer decomposition, base
            image output format matches this field, while layers are always
            output in `png` format.
        z_index:
          type: integer
          description: >-
            Layer stacking order index (returned in layer decomposition). The
            base image is fixed to `0`; layers start from `1` and increment.
        name:
          type: string
          description: >-
            Layer name or label (returned in layer decomposition) identifying
            the main content of the layer.
        description:
          type: string
          description: >-
            Detailed semantic description of the decomposed layer (returned in
            layer decomposition).
        bounding_box:
          type: object
          description: >-
            Bounding box coordinates of the output layer in the coordinate
            system of the output base image (returned for layers in layer
            decomposition).
          properties:
            absolute:
              type: array
              items:
                type: integer
              description: >-
                Absolute pixel coordinates `[left, top, right, bottom]` in the
                coordinate system of the output base image.
            normalized:
              type: array
              items:
                type: integer
              description: >-
                Normalized coordinates `[left, top, right, bottom]` converted to
                discrete integers in the range `[0, 1000]`.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````