> ## 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.

# Видео со звуком - первый и последний кадр

> Видео со звуком — первый и последний кадр. Генерация видео со звуком на основе первого и последнего кадров.только Seedance 2.0 серияподдерживается. Все 4 модели. Отправьте асинхронную задачу ивернуть id, используйте эндпоинт для получения результата.

Эндпоинт видео со звуком - первый и последний кадр **Seedance API генерации видео**. Генерация видео с синхронизированным аудио на основе двух кадров. Все 4 модели. Отправьте асинхронную задачу и верните id.

**Использование**: Включите text и два image\_url (role=first\_frame, role=last\_frame), установите generate\_audio: true.


## OpenAPI

````yaml openapi/ru/seedance-audio-first-last-frame.json POST /sd/api/v3/contents/generations/tasks
openapi: 3.1.0
info:
  title: Seedance API генерации видео (Видео со звуком — первый и последний кадр)
  version: 1.0.0
  description: Генерация видео со звуком из первого и последнего кадров.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /sd/api/v3/contents/generations/tasks:
    post:
      description: >-
        Видео со звуком — первый и последний кадр. Генерация видео со звуком на
        основе первого и последнего кадров.только Seedance 2.0
        серияподдерживается. Все 4 модели. Отправьте асинхронную задачу ивернуть
        id, используйте эндпоинт для получения результата.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRequest'
            example:
              model: doubao-seedance-2-0-260128
              content:
                - type: text
                  text: Девушка гуляет по пляжу
                - type: image_url
                  image_url:
                    url: https://example.com/first.jpg
                  role: first_frame
                - type: image_url
                  image_url:
                    url: https://example.com/last.jpg
                  role: last_frame
              ratio: '16:9'
              duration: 10
              generate_audio: true
              watermark: true
      responses:
        '200':
          description: Задача успешно отправлена
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID задачи
                example:
                  id: cgt-20261021120000-xxxxx
                required:
                  - id
      security:
        - CustomApiKey: []
components:
  schemas:
    CreateRequest:
      type: object
      properties:
        model:
          type: string
          enum:
            - doubao-seedance-2-5-260628
            - doubao-seedance-2-0-260128
            - doubao-seedance-2-0-fast-260128
            - doubao-seedance-2-0-mini-260615
          description: ID модели
        content:
          type: array
          items:
            $ref: '#/components/schemas/ContentItem'
          description: >-
            Список входного контента. Должен содержать 2 элемента image_url
            (role: first_frame и last_frame), опционально text и audio_url
        resolution:
          type: string
          enum:
            - 480p
            - 720p
            - 1080p
            - 4k
          default: 720p
          description: >-
            Разрешение видео. Seedance 2.0: 480p, 720p, 1080p, 4k. По умолчанию
            720p
        ratio:
          type: string
          enum:
            - adaptive
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
            - '21:9'
          default: adaptive
          description: >-
            Соотношение сторон видео. По умолчанию adaptive (авто), или укажите
            конкретное
        duration:
          type: integer
          default: -1
          description: Длительность видео (сек). Диапазон [4, 15] или -1 (умный выбор)
        generate_audio:
          type: boolean
          default: true
          description: Генерировать синхронизированный звук
        watermark:
          type: boolean
          default: false
          description: Добавить водяной знак
        return_last_frame:
          type: boolean
          default: false
          description: Вернуть изображение последнего кадра
        callback_url:
          type: string
          description: URL обратного вызова
        execution_expires_after:
          type: integer
          default: 172800
          description: Тайм-аут задачи (сек). Диапазон [3600, 259200]
        priority:
          type: integer
          default: 0
          description: Приоритет выполнения. Диапазон [0, 9]
        safety_identifier:
          type: string
          description: Идентификатор конечного пользователя, макс. 64 символа
        tools:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - web_search
          description: Конфигурация инструментов
        service_tier:
          type: string
          enum:
            - default
          default: default
          description: Уровень обслуживания
      required:
        - model
        - content
    ContentItem:
      type: object
      description: Элемент входного контента
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - text
            text:
              type: string
              description: Текстовый промпт
          required:
            - type
            - text
        - type: object
          properties:
            type:
              type: string
              enum:
                - image_url
            image_url:
              type: object
              properties:
                url:
                  type: string
                  description: >-
                    URL изображения / Base64. Форматы:
                    jpeg/png/webp/bmp/tiff/gif/heic/heif，размер < 30MB
            role:
              type: string
              enum:
                - first_frame
                - last_frame
              description: >-
                Назначение изображения: first_frame=первый кадр,
                last_frame=последний кадр
          required:
            - type
            - image_url
            - role
        - type: object
          properties:
            type:
              type: string
              enum:
                - audio_url
            audio_url:
              type: object
              properties:
                url:
                  type: string
                  description: >-
                    URL аудио / Base64 / Asset ID. Формат: wav/mp3, длительность
                    [2, 15]с, размер ≤ 15МБ
            role:
              type: string
              enum:
                - reference_audio
              description: Фиксированное значение reference_audio
          required:
            - type
            - audio_url
            - role
  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.