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

> ## Agent Instructions
> Send API requests to https://api.ttapi.io with the TT-API-KEY header. Midjourney account hosting uses https://hold.ttapi.io. Claude Code uses https://cc.ttapi.io.
> Most generation endpoints are asynchronous. The submit response returns a job id. Poll that product's fetch endpoint, or pass a webhook on the submit request. A fetch call does not start a new generation.
> 1 USD = 100 quota. Check the pricing page for that product before estimating cost.
> This file lists the English docs. Follow every /_llms/ link recursively for the API reference, Chinese, and Russian. Open a page's .md URL for the endpoint schema.

# Разделение слоёв

> Разделение слоёв - Отправить асинхронную задачу, вернуть id

Эндпоинт разделение слоёв **Seedream API генерации изображений**. Разделение одного изображения на базовое (1) + несколько слоёв (до 16). Только Seedream 5.0 pro / flash. Отправьте асинхронную задачу и верните `id`.

**Использование**: Используйте координаты `<bbox>` в промпте, установите `layer_decomposition: true`.


## OpenAPI

````yaml openapi/ru/seedream-layer-decomposition.json POST /sd/api/v3/images/generations/tasks
openapi: 3.1.0
info:
  title: Seedream - Разделение слоёв
  version: 1.0.0
  description: >-
    Seedream Разделение слоёв API - Разложение изображения на базовое и
    несколько слоёв. Поддерживается только Seedream 5.0 pro/flash.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /sd/api/v3/images/generations/tasks:
    post:
      description: Разделение слоёв - Отправить асинхронную задачу, вернуть id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LayerDecompositionRequest'
            example:
              model: doubao-seedream-5-0-pro-260628
              prompt: Отделить персонажа от фона <bbox>(0.1, 0.2, 0.8, 0.9)
              image: https://example.com/photo.jpg
              layer_decomposition: true
              watermark: false
      responses:
        '200':
          description: Задача успешно отправлена
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: PENDING_QUEUE
                    description: Статус задачи
                  message:
                    type: string
                    example: success
                  id:
                    type: string
                    description: ID задачи
                    example: 30d9b07d-7349-4cbc-8e11-9ba302c6d165
                required:
                  - status
                  - message
                  - id
      security:
        - CustomApiKey: []
components:
  schemas:
    LayerDecompositionRequest:
      type: object
      description: Разделение слоёв параметры запроса
      properties:
        model:
          type: string
          description: Название модели.
          enum:
            - doubao-seedream-5-0-pro-260628
            - doubao-seedream-5-0-flash-260915
        prompt:
          type: string
          description: >-
            Текстовый промпт, используйте координаты <bbox> для отметки областей
            разложения.
        image:
          type: string
          description: URL изображения для разложения.
        layer_decomposition:
          type: boolean
          description: >-
            Включить режим разложения слоёв. true=разложение входного
            изображения на базовое и слои (макс. 16); false=режим генерации.
            Только Seedream 5.0 pro/flash.
          default: false
          enum:
            - true
            - false
        size:
          type: string
          description: >-
            Размер изображения. Разделение слоёв: 1K, 1.5K, 2K, auto (по
            умолчанию auto, как входное изображение). Пиксели не поддерживаются.
          default: auto
          enum:
            - 1K
            - 1.5K
            - 2K
            - auto
        output_format:
          type: string
          description: >-
            Формат выходного изображения. При разделении слоёв контролирует
            только формат базового изображения, слои всегда в png.
          default: jpeg
          enum:
            - png
            - jpeg
        response_format:
          type: string
          description: Формат ответа.
          default: url
          enum:
            - url
            - b64_json
        watermark:
          type: boolean
          description: >-
            Добавить водяной знак. true=Отображать «AI Generated» в правом
            нижнем углу, false=Не добавлять.
          default: true
          enum:
            - true
            - false
          example: false
        optimize_prompt_options:
          type: object
          description: Конфигурация оптимизации промпта
          properties:
            mode:
              type: string
              enum:
                - standard
                - fast
              default: standard
              description: >-
                Режим оптимизации. standard=стандартный (качество выше, время
                дольше), fast=быстрый (время короче, качество ниже, 5.0 flash не
                поддерживается)
        execution_expires_after:
          type: integer
          default: 172800
          description: >-
            Тайм-аут задачи (сек). Диапазон [3600, 259200] (1-72ч), по умолчанию
            172800 (48ч)
        priority:
          type: integer
          default: 0
          description: >-
            Приоритет выполнения. Диапазон [0, 9], больше = выше приоритет, по
            умолчанию 0 (FIFO)
        safety_identifier:
          type: string
          description: >-
            Уникальный идентификатор пользователя, макс. 64 символа.
            Рекомендуется хэшированная строка
      required:
        - model
        - prompt
        - image
        - layer_decomposition
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        Получите API ключ в <a href='https://dashboard.ttapi.io'
        target='_blank'>TTAPI Дашборд</a>.

````

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