> ## 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 Text-to-Image

> Supported models include `seedream-5-0-260128`. This document covers Text-to-Image and Sequential Image Generation scenarios. Public fields include `model`, `prompt`, `image`, `size`, `seed`, `sequential_image_generation`, `sequential_image_generation_options`, `response_format`, and `watermark`.



## OpenAPI

````yaml api-reference/en/zmodelImage/byteplus/seedream-5-0-text-to-image.json POST /v1/images/generations
openapi: 3.0.1
info:
  title: Seedream 5.0 Text-to-Image
  version: 1.0.0
  description: >-
    Seedream series Text-to-Image 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 Text-to-Image
      description: >-
        Supported models include `seedream-5-0-260128`. This document covers
        Text-to-Image and Sequential Image Generation scenarios. Public fields
        include `model`, `prompt`, `image`, `size`, `seed`,
        `sequential_image_generation`, `sequential_image_generation_options`,
        `response_format`, and `watermark`.
      operationId: byteplusTextToImage50
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextToImageRequest'
            examples:
              text_to_image:
                summary: Basic Text-to-Image
                value:
                  model: seedream-5-0-260128
                  prompt: >-
                    A cute corgi running on the grass, sunny day, realistic
                    style
                  size: 2048x2048
                  response_format: url
              sequential_images:
                summary: Sequential Image Generation
                value:
                  model: seedream-5-0-260128
                  prompt: >-
                    A set of four-season landscape illustrations, spring,
                    summer, autumn, winter
                  sequential_image_generation: auto
                  response_format: url
              sequential_images_with_limit:
                summary: Limit Max Sequential Images
                value:
                  model: seedream-5-0-260128
                  prompt: >-
                    A set of four-season landscape illustrations, spring,
                    summer, autumn, winter
                  sequential_image_generation: auto
                  sequential_image_generation_options:
                    max_images: 3
      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: Parameter Error
                  value:
                    error:
                      message: Invalid request body format or field value
                      type: invalid_request_error
                      code: bad_request_body
                      param: ''
        '401':
          description: >-
            Authentication failed, for example, no token provided or invalid
            token.
          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 triggered or insufficient account quota.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                quota_exceeded:
                  summary: Insufficient quota or rate limited
                  value:
                    error:
                      message: Insufficient account quota, please try again later
                      type: api_error
                      code: insufficient_user_quota
                      param: ''
        '500':
          description: Internal error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Internal processing failure
                  value:
                    error:
                      message: >-
                        Internal service processing failure, please try again
                        later
                      type: api_error
                      code: gen_relay_info_failed
                      param: ''
      security:
        - BearerAuth: []
components:
  schemas:
    TextToImageRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          enum:
            - seedream-5-0-260128
          description: >-
            The name of the image generation model. Supported models include
            `seedream-5-0-260128`.
        prompt:
          type: string
          description: >-
            The prompt for generating images. Supports both Chinese and English.
            It is recommended not to exceed 300 Chinese characters or 600
            English words. If the prompt is too long, the information may be
            diluted, causing the model to ignore details and focus only on key
            points, resulting in missing elements in the image.
          example: >-
            Vibrant close-up editorial portrait, model with sharp eyes, wearing
            a sculptural hat, rich color blocking.
        image:
          oneOf:
            - type: string
              description: The input image information. Supports URL or Base64 encoding.
            - type: array
              description: >-
                Multiple input image information. Supports URL or Base64
                encoding.
              items:
                type: string
              maxItems: 14
          description: >-
            The input image information. Supports URL or Base64 encoding.
            seedream 5.0/4.5/4.0 supports single image or multi-image input.


            - Image URL: Please ensure the image URL is accessible.

            - Base64 encoding: Please follow the format
            `data:image/<format>;base64,<base64_encoded>`. Note: `<format>` must
            be lowercase, e.g., `data:image/png;base64,<base64_image>`.


            Description:

            - Single image requirements:
              - Image format: jpeg, png (seedream 5.0/4.5/4.0 additionally supports webp, bmp, tiff, gif, heic, heif formats)
              - Aspect ratio (width/height) range: [1/16, 16] (applicable model: seedream 5.0/4.5/4.0)
              - Width and height (px) > 14
              - Size: no more than 30MB
              - Total pixels: no more than 6000×6000 = 36000000 px (restriction on the product of width and height pixels for a single image, not a restriction on individual width or height values)
            - seedream 5.0/4.5/4.0 supports up to 14 reference images.
        size:
          type: string
          x-enum:
            - 2K
            - 3K
          description: >-
            Specifies the size information of the generated image. Different
            models support different size configuration methods.


            **seedream-5-0-260128**:

            Specifies the size information of the generated image. Supports the
            following two methods, which cannot be mixed.


            * Method 1 | Specify the pixel width and height of the generated
            image:
              * Default value: `2048x2048`
              * Total pixel value range: [`2560x1440` (3686400), `4096x4096` (16777216)]
              * Aspect ratio range: [1/16, 16]

              > Note: When using Method 1, both the total pixel value range and the aspect ratio range must be satisfied simultaneously. The total pixel value is the product of the width and height pixels of a single image, not a restriction on individual width or height values.
              > * Valid example: `3750x1250`
                Total pixel value 3750x1250=4687500, which meets the [3686400, 16777216] range requirement; aspect ratio 3750/1250=3, which meets the [1/16, 16] range requirement, so the example value is valid.
              > * Invalid example: `1500x1500`
                Total pixel value 1500x1500=2250000, which does not meet the minimum requirement of 3686400; aspect ratio 1500/1500=1, although it meets the [1/16, 16] range requirement, the two restrictions are not satisfied simultaneously, so the example value is invalid.

            * Method 2 | Specify the resolution of the generated image, and
            describe the image aspect ratio, shape, or purpose in natural
            language within the prompt, allowing the model to determine the size
            of the generated image.
              * Available values: `2K`, `3K`, `4K`

              Note: When using Method 2 and describing a specific aspect ratio in the prompt, the reference pixel dimensions actually mapped by the model are:

              | Resolution | Aspect Ratio | Pixel Dimensions |
              |---|---|---|
              | 2K | 1:1 | 2048x2048 |
              | | 4:3 | 2304x1728 |
              | | 3:4 | 1728x2304 |
              | | 16:9 | 2848x1600 |
              | | 9:16 | 1600x2848 |
              | | 3:2 | 2496x1664 |
              | | 2:3 | 1664x2496 |
              | | 21:9 | 3136x1344 |
              | 3K | 1:1 | 3072x3072 |
              | | 4:3 | 3456x2592 |
              | | 3:4 | 2592x3456 |
              | | 16:9 | 4096x2304 |
              | | 9:16 | 2304x4096 |
              | | 3:2 | 3744x2496 |
              | | 2:3 | 2496x3744 |
              | | 21:9 | 4704x2016 |
              | 4K | 1:1 | 4096x4096 |
              | | 4:3 | 4704x3520 |
              | | 3:4 | 3520x4704 |
              | | 16:9 | 5504x3040 |
              | | 9:16 | 3040x5504 |
              | | 3:2 | 4992x3328 |
              | | 2:3 | 3328x4992 |
              | | 21:9 | 6240x2656 |
          default: 2K
          example: 2048x2048
        response_format:
          type: string
          enum:
            - url
            - b64_json
          description: >-
            Specifies the return format of the generated image. Supports the
            following two return methods:

            - `url`: Returns an image download link; the link is valid for 24
            hours after image generation, please download the image promptly.

            - `b64_json`: Returns image data in JSON format as a Base64-encoded
            string.
          default: url
        seed:
          type: integer
          description: >-
            Random seed. Supported by some Seedream models. Value range: [-1,
            2147483647].
          default: -1
          minimum: -1
          maximum: 2147483647
        sequential_image_generation:
          type: string
          enum:
            - auto
            - disabled
          description: >-
            Controls whether to disable the sequential image generation feature.

            - `auto`: Automatic determination mode. The model will autonomously
            decide whether to return a set of images and the number of images
            based on the user's prompt.

            - `disabled`: Disable the sequential image generation feature. The
            model will only generate one image.


            Only seedream 5.0/4.5/4.0 support this parameter.
          default: disabled
        sequential_image_generation_options:
          type: object
          description: >-
            Configuration for the sequential image generation feature. Only
            takes effect when `sequential_image_generation` is set to `auto`.


            Only seedream 5.0/4.5/4.0 support this parameter.
          properties:
            max_images:
              type: integer
              description: >-
                Specifies the maximum number of images that can be generated in
                this request.

                - Value range: [1, 15]


                Note: The actual number of images that can be generated is
                affected not only by `max_images` but also by the number of
                input reference images. The number of input reference images +
                the final generated images ≤ 15.
              minimum: 1
              maximum: 15
              default: 15
        watermark:
          type: boolean
          description: >-
            Whether to add a watermark to the generated image.

            - `false`: No watermark added.

            - `true`: Adds an "AIGeneration" watermark in the bottom right
            corner of the image.
          default: true
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          format: int64
          description: Unix timestamp (seconds) of the creation time.
        data:
          type: array
          items:
            $ref: '#/components/schemas/ImageData'
          description: >-
            List of generated images. May contain multiple images in sequential
            image generation scenarios.
    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 link. Valid for 24 hours, please save it promptly.
        b64_json:
          type: string
          description: Base64-encoded image data.
        size:
          type: string
          description: >-
            Image dimensions (width x height). Only returned by
            seedream-5.0-lite/4.5/4.0.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass in the request header as `Authorization: Bearer <token>`.'

````