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

# 查询结果

> 查询视频生成任务结果。仅支持查询最近 7 天的任务记录，视频 URL 有效期 24 小时。

这是 **Seedance 视频生成 API** 的查询接口。通过 `id` 查询视频生成任务的状态和结果。


## OpenAPI

````yaml openapi/cn/seedance.json POST /sd/api/v3/contents/generations/tasks/{id}
openapi: 3.1.0
info:
  title: Seedance 视频生成 API（查询）
  version: 1.0.0
  description: Seedance 视频生成任务查询接口。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /sd/api/v3/contents/generations/tasks/{id}:
    post:
      description: 查询视频生成任务结果。仅支持查询最近 7 天的任务记录，视频 URL 有效期 24 小时。
      parameters:
        - name: id
          in: path
          required: true
          description: 任务 ID
          schema:
            type: string
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 任务 ID。仅保存 7 天（从 created_at 开始计算）。
                  model:
                    type: string
                    description: 模型名称与版本，格式为 模型名称-版本
                  status:
                    type: string
                    enum:
                      - queued
                      - running
                      - succeeded
                      - failed
                      - cancelled
                      - expired
                    description: >-
                      任务状态：queued=排队中、running=运行中、succeeded=成功、failed=失败、cancelled=已取消、expired=超时
                  content:
                    type: object
                    description: 输出内容
                    properties:
                      video_url:
                        type: string
                        description: 生成视频的 URL。有效期 24 小时，Seedance 2.5 下载次数上限 100 次，请及时下载保存。
                      last_frame_url:
                        type: string
                        description: >-
                          尾帧图像 URL（jpeg 格式）。创建任务时设置 return_last_frame: true
                          时返回，有效期 24 小时。
                  created_at:
                    type: integer
                    description: 创建时间（Unix 时间戳，秒）
                  updated_at:
                    type: integer
                    description: 更新时间（Unix 时间戳，秒）
                  draft:
                    type: boolean
                    description: 是否为样片视频（true=样片，false=正式视频）
                  duration:
                    type: integer
                    description: 视频时长（秒）。实际总帧数 / 24（向下取整）。与 frames 只返回一个。
                  frames:
                    type: integer
                    description: 视频帧数。与 duration 只返回一个。
                  framespersecond:
                    type: integer
                    description: 视频帧率
                  error:
                    type: object
                    description: 错误信息。成功时返回 null，失败时返回错误数据。
                    properties:
                      code:
                        type: string
                        description: 错误码
                      message:
                        type: string
                        description: 错误提示信息
                  execution_expires_after:
                    type: integer
                    description: 任务超时阈值（秒）
                  generate_audio:
                    type: boolean
                    description: 是否生成同步音频
                  output_format:
                    type: string
                    enum:
                      - mp4
                      - mov
                    description: 输出格式
                  priority:
                    type: integer
                    description: 执行优先级（0~9）
                  ratio:
                    type: string
                    description: 宽高比
                  resolution:
                    type: string
                    enum:
                      - 480p
                      - 720p
                      - 1080p
                      - 4k
                    description: 分辨率
                  safety_identifier:
                    type: string
                    description: 终端用户标识
                  seed:
                    type: integer
                    description: 随机种子
                  service_tier:
                    type: string
                    enum:
                      - default
                      - flex
                    description: 服务等级
                  tools:
                    type: array
                    description: 实际使用的工具
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - web_search
                          description: 工具类型
                  usage:
                    type: object
                    description: token 用量
                    properties:
                      completion_tokens:
                        type: integer
                        description: 生成视频消耗的 token 数
                      total_tokens:
                        type: integer
                        description: 总 token 数（= completion_tokens）
                      tool_usage:
                        type: object
                        description: 工具用量
                        properties:
                          web_search:
                            type: integer
                            description: 联网搜索调用次数
                example:
                  id: cgt-20261021120000-xxxxx
                  model: doubao-seedance-2-0-260128
                  status: succeeded
                  content:
                    video_url: https://cdn.ttapi.io/seedance/2026-10-21/xxxx.mp4
                  created_at: 1779348818
                  updated_at: 1779348874
                  duration: 5
                  resolution: 720p
                  ratio: '16:9'
                  framespersecond: 24
                  service_tier: default
                  execution_expires_after: 172800
                  generate_audio: true
                  draft: false
                  priority: 0
                  usage:
                    completion_tokens: 108900
                    total_tokens: 108900
                required:
                  - id
                  - status
      security:
        - CustomApiKey: []
components:
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````

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