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

# API получения результатов видеозадач Suno

> Проверяйте статус видеозадач Suno и получайте результаты генерации и сведения об ошибках.

Для получения результата используйте `data.jobId`, возвращённый при [генерации видео](https://docs.ttapi.io/api/ru/suno/suno_video_generate.md) или его [продлении](https://docs.ttapi.io/api/ru/suno/suno_video_extend.md).


## OpenAPI

````yaml openapi/ru/suno-video-fetch.json GET /suno/v2/fetch
openapi: 3.1.0
info:
  title: TTAPI Suno API получения результатов видео
  version: 1.0.0
  description: Получите сведения об отправленной видеозадаче Suno.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /suno/v2/fetch:
    get:
      summary: Получение результата видеозадачи
      description: >-
        Получите сведения об отправленной видеозадаче Suno. API-ключ должен
        иметь разрешение Suno Video, а задача должна принадлежать текущему
        пользователю.
      parameters:
        - name: jobId
          in: query
          required: false
          schema:
            type: string
          description: Значение data.jobId, возвращённое эндпоинтом отправки задачи.
          example: video-9c64b7e1-f00d-456e-8c56-a0227f5128fb
      responses:
        '200':
          description: >-
            Запрос выполнен успешно. Поле status в ответе отражает ход
            выполнения и результат видеозадачи.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SunoVideoFetchResult'
              examples:
                video_success:
                  summary: Видеозадача выполнена успешно
                  value:
                    status: SUCCESS
                    message: success
                    jobId: video-9c64b7e1-f00d-456e-8c56-a0227f5128fb
                    data:
                      quota: '75.00000000'
                      request_body:
                        prompt: >-
                          Бумажный фонарик медленно поднимается в звёздное небо,
                          камера следует за ним вверх.
                        duration: 5
                        resolution: 480p
                        aspect_ratio: '9:16'
                      videos:
                        - creation_id: crt_0187b131-a1c0-7151-a92e-cd8645e4bb01
                          status: succeeded
                          video_url: https://cdn.ttapi.io/suno/example-1.mp4
                          asset:
                            poster_url: https://example.com/poster-1.jpg
                            thumbnail_url: https://example.com/thumbnail-1.jpg
                            last_frame_url: https://example.com/last-frame-1.jpg
                            width: 480
                            height: 854
                            duration_s: 5.167
                            content_type: video/mp4
                            status: ready
                          error: null
                          error_code: null
                        - creation_id: crt_0187b131-a1c0-7151-a92e-cd8645e4bb02
                          status: succeeded
                          video_url: https://cdn.ttapi.io/suno/example-2.mp4
                          asset:
                            poster_url: https://example.com/poster-2.jpg
                            thumbnail_url: https://example.com/thumbnail-2.jpg
                            last_frame_url: https://example.com/last-frame-2.jpg
                            width: 480
                            height: 854
                            duration_s: 5.167
                            content_type: video/mp4
                            status: ready
                          error: null
                          error_code: null
                video_queued:
                  summary: Видеозадача в обработке
                  value:
                    status: ON_QUEUE
                    message: null
                    jobId: video-9c64b7e1-f00d-456e-8c56-a0227f5128fb
                    data:
                      quota: '75.00000000'
                      request_body:
                        prompt: >-
                          Бумажный фонарик медленно поднимается в звёздное небо,
                          камера следует за ним вверх.
                        duration: 5
                        resolution: 480p
                        aspect_ratio: '9:16'
                      videos: []
                video_failed:
                  summary: Видеозадача завершилась ошибкой
                  value:
                    status: FAILED
                    message: nudity_sexual
                    jobId: video-9c64b7e1-f00d-456e-8c56-a0227f5128fb
                    data:
                      quota: '0'
                      request_body:
                        prompt: >-
                          Бумажный фонарик медленно поднимается в звёздное небо,
                          камера следует за ним вверх.
                        duration: 5
                        resolution: 480p
                        aspect_ratio: '9:16'
                      videos:
                        - creation_id: crt_0187b131-a1c0-7151-a92e-cd8645e4bb01
                          status: failed
                          video_url: null
                          asset: null
                          error: nudity_sexual
                          error_code: moderated
                          moderation_reason: nudity_sexual
                        - creation_id: crt_0187b131-a1c0-7151-a92e-cd8645e4bb02
                          status: failed
                          video_url: null
                          asset: null
                          error: nudity_sexual
                          error_code: moderated
                          moderation_reason: nudity_sexual
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
        '403':
          description: >-
            У API-ключа нет разрешения на нужный продукт, либо запрос нарушает
            ограничения доступа аккаунта.
      security:
        - CustomApiKey: []
components:
  schemas:
    SunoVideoFetchResult:
      title: Результат видеозадачи
      type: object
      required:
        - status
        - message
        - jobId
        - data
      properties:
        status:
          type: string
          enum:
            - ON_QUEUE
            - SUCCESS
            - FAILED
        message:
          type:
            - string
            - 'null'
          description: >-
            Сообщение задачи. При сбое генерации может содержать ошибку
            исходного сервиса для первого неудачного видео.
        jobId:
          type: string
          description: Значение data.jobId, возвращённое эндпоинтом отправки задачи.
        data:
          type: object
          required:
            - quota
            - request_body
            - videos
          properties:
            quota:
              type: string
              description: Квота, израсходованная задачей.
            request_body:
              description: Параметры запроса.
              allOf:
                - $ref: '#/components/schemas/SunoVideoGenerateRequest'
                - type: object
                  required:
                    - resolution
                    - model
                    - aspect_ratio
            videos:
              type: array
              maxItems: 2
              items:
                $ref: '#/components/schemas/SunoVideoTake'
              description: Массив сгенерированных видео.
    SunoVideoGenerateRequest:
      title: Параметры генерации видео
      type: object
      required:
        - prompt
        - duration
      properties:
        prompt:
          type: string
          description: Опишите сцену, движение камеры и стиль.
          minLength: 1
          maxLength: 30000
        duration:
          type: integer
          minimum: 5
          maximum: 15
          description: Длительность генерации в секундах.
        resolution:
          type:
            - string
            - 'null'
          description: Выходное разрешение. 480p соответствует fast, 720p — standard.
          enum:
            - 480p
            - 720p
          default: 480p
        aspect_ratio:
          type:
            - string
            - 'null'
          description: Соотношение сторон видео.
          enum:
            - '1:1'
            - '9:16'
            - '16:9'
            - '4:3'
            - '3:4'
          default: '9:16'
        first_frame_url:
          type: string
          description: >-
            Публичный HTTP(S) URL изображения первого кадра. Можно использовать
            отдельно, с последним кадром или с референсными изображениями.
          format: uri
        last_frame_url:
          type: string
          description: >-
            Публичный HTTP(S) URL изображения последнего кадра. Требуется также
            передать первый кадр; сочетание первого и последнего кадров не
            поддерживает референсные изображения.
          format: uri
        reference_image_urls:
          type: array
          maxItems: 9
          items:
            type: string
            description: Публичный HTTP(S) URL референсного изображения.
            format: uri
          description: >-
            До 9 изображений. Можно использовать отдельно или вместе с первым
            кадром.
        song_id:
          type: string
          description: >-
            ID песни Suno для референсного аудио. Можно сочетать с
            изображениями.
        song_window:
          type: object
          description: >-
            Интервал референсного аудио. Требуется song_id. Если не указан,
            используется фрагмент с нулевой секунды длительностью, равной
            длительности видео.
          properties:
            start_s:
              type: number
              minimum: 0
              default: 0
              description: Время начала в секундах. Допускаются дробные значения.
            end_s:
              type: number
              minimum: 0
              description: >-
                Время окончания в секундах. По умолчанию равно start_s +
                duration. При явном указании длина интервала должна равняться
                duration.
        lip_sync:
          type: boolean
          default: false
          description: Включить синхронизацию губ. При значении true требуется song_id.
        hookUrl:
          type: string
          format: uri
          description: >-
            Необязательный URL вебхука. После завершения задачи результат
            отправляется методом HTTP POST; тело совпадает с ответом Fetch V2
            для видеозадачи.
    SunoVideoTake:
      type: object
      required:
        - creation_id
        - status
        - video_url
        - asset
        - error
        - error_code
      properties:
        creation_id:
          type: string
          description: ID видео.
        status:
          type: string
          description: >-
            Статус отдельного результата, например pending, succeeded или
            failed.
        video_url:
          type:
            - string
            - 'null'
          description: >-
            URL MP4 для воспроизведения, возвращаемый после успешного выполнения
            задачи.
          format: uri
        asset:
          type:
            - object
            - 'null'
          description: Метаданные медиафайла. Значение null, если файл ещё не получен.
          properties:
            poster_url:
              type: string
              description: URL обложки.
              format: uri
            thumbnail_url:
              type: string
              description: URL миниатюры.
              format: uri
            last_frame_url:
              type: string
              description: URL изображения последнего кадра.
              format: uri
            width:
              type: integer
              description: Ширина в пикселях.
            height:
              type: integer
              description: Высота в пикселях.
            duration_s:
              type: number
              description: Фактическая длительность видео в секундах.
            content_type:
              type: string
              description: Тип медиа, например video/mp4.
            status:
              type: string
              description: Статус медиафайла, например ready.
        error:
          type:
            - string
            - 'null'
          description: Сообщение об ошибке.
        error_code:
          type:
            - string
            - 'null'
          description: Код ошибки.
        moderation_reason:
          type: string
          description: Причина отклонения модерацией.
  responses:
    400Response:
      description: Ошибка параметров
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: Ошибка авторизации
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  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.