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

# Seedream 4.0 T2I

> [Core Function] Seedream 4.0 T2I is an older high-definition image creation model. [Strengths] It generates high-definition images up to 4K. [Best For] Existing workflows. [Limitations] Superseded by Seedream 4.5 in fidelity and consistency. [Routing] Default to Seedream 4.5 unless 4.0 is explicitly requested.



## OpenAPI

````yaml /media-model-api/bytedance/bytedance-t2i.json post /bytedance/seedream-4.0-t2i
openapi: 3.1.0
info:
  description: The text-to-image models API from ByteDance.
  version: 1.0.0
  contact:
    name: Modellix Support
    email: support@modellix.ai
  title: ByteDance Text-to-Image Models API
servers:
  - url: https://api.modellix.ai/api/v1
    description: The text-to-image models API from ByteDance.
security:
  - bearerAuth: []
paths:
  /bytedance/seedream-4.0-t2i:
    post:
      summary: Seedream 4.0 T2I
      description: >-
        [Core Function] Seedream 4.0 T2I is an older high-definition image
        creation model. [Strengths] It generates high-definition images up to
        4K. [Best For] Existing workflows. [Limitations] Superseded by Seedream
        4.5 in fidelity and consistency. [Routing] Default to Seedream 4.5
        unless 4.0 is explicitly requested.
      operationId: seedream40T2iAsync
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Seedream40T2iRequest'
            examples:
              basic:
                summary: Basic 2K generation
                value:
                  prompt: Beautiful cherry blossom garden in spring, soft lighting
              batch:
                summary: Batch generation with optimization
                value:
                  prompt: Ancient temple in misty mountains
                  size: 2048x2048
                  sequential_image_generation: auto
                  sequential_image_generation_max_images: 5
                  optimize_prompt_mode: standard
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskResponse'
              example:
                code: 0
                message: success
                data:
                  status: pending
                  task_id: task-def456
                  model_id: model-123
                  get_result:
                    method: GET
                    url: https://api.modellix.ai/api/v1/tasks/task-def456
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Seedream40T2iRequest:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          description: >-
            Image description text, supports Chinese and English. Maximum 10000
            characters. We recommend keeping the prompt under 600 words.
            Excessively long prompts may scatter information, causing the model
            to overlook details and focus only on major elements, which can
            result in missing details in the generated image.
          minLength: 1
          maxLength: 10000
          example: Beautiful cherry blossom garden in spring, soft lighting
        size:
          type: string
          description: >-
            Image size in format 'widthxheight'. Range: Total pixels 921,600 to
            16,777,216, aspect ratio 1/16 to 16
          default: 2048x2048
          example: 2048x2048
        sequential_image_generation:
          type: string
          enum:
            - auto
            - disabled
          description: >-
            Batch generation mode. 'auto': auto batch generate up to 15 images,
            'disabled': generate single image only
          default: disabled
          example: auto
        sequential_image_generation_max_images:
          type: integer
          description: >-
            Maximum number of images for batch generation. (input images +
            generated images ≤ 15)
          default: 5
          minimum: 1
          maximum: 15
          example: 5
        optimize_prompt_mode:
          type: string
          enum:
            - standard
            - fast
          description: >-
            Prompt optimization mode. 'standard': high quality (longer time),
            'fast': fast optimization (shorter time)
          default: standard
          example: standard
    AsyncTaskResponse:
      type: object
      required:
        - code
        - message
        - data
      properties:
        code:
          type: integer
          description: Response code, 0 indicates success
          example: 0
        message:
          type: string
          description: Response message
          example: success
        data:
          type: object
          required:
            - status
            - task_id
            - model_id
          properties:
            status:
              type: string
              enum:
                - pending
                - processing
              description: Task status
              example: pending
            task_id:
              type: string
              description: Unique task identifier
              example: task-abc123
            model_id:
              type: string
              description: Model ID
              example: model-123
            get_result:
              type: object
              description: API information to query the task result
              properties:
                method:
                  type: string
                  description: HTTP method
                  example: GET
                url:
                  type: string
                  description: Full URL to query the task result
                  example: https://api.modellix.ai/api/v1/tasks/task-abc123
          description: Detailed data about the submitted asynchronous task.
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: Error code (equals HTTP status code)
          example: 400
        message:
          type: string
          description: 'Error message in format ''Category: detail'''
          example: 'Invalid parameters: parameter ''prompt'' is required'
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 400
            message: 'Invalid parameters: parameter ''prompt'' is required'
    Unauthorized:
      description: Unauthorized - Invalid or missing API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            message: 'Authentication failed: invalid API key'
    TooManyRequests:
      description: Too many requests - Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          description: Maximum requests per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Remaining quota in current window
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          description: Rate limit window reset time (Unix timestamp)
          schema:
            type: integer
            example: 1704067260
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 429
            message: >-
              Rate limit exceeded: 100 requests per minute, retry after 60
              seconds
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 500
            message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API Key authentication. Format: `Bearer YOUR_API_KEY`.'

````