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

# 全模态参考

> 全模态参考生成视频。基于参考图片和视频，融合多模态内容生成新视频。支持全部 4 个模型。提交异步任务后返回 id，需通过查询接口获取结果。

这是 **Seedance 视频生成 API** 的全模态参考接口。基于参考图片和视频，融合多模态内容生成新视频。支持全部 4 个模型。提交异步任务后返回 id，需通过查询接口获取结果。

**使用方式**：在 `content` 中包含 `text`（提示词）、`image_url`（role=reference\_image，参考图片）、`video_url`（role=reference\_video，参考视频）和可选的 `audio_url`（role=reference\_audio，参考音频），设置 `omni_reference_task_type: "reference"`。


## OpenAPI

````yaml openapi/cn/seedance-omni-reference.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: 全模态参考生成视频。基于参考图片和视频，融合多模态内容生成新视频。支持全部 4 个模型。提交异步任务后返回 id，需通过查询接口获取结果。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRequest'
            example:
              model: doubao-seedance-2-5-260628
              content:
                - type: text
                  text: 明亮多彩的广告片风格
                - type: image_url
                  image_url:
                    url: https://example.com/ref.png
                  role: reference_image
                - type: video_url
                  video_url:
                    url: https://example.com/ref.mp4
                  role: reference_video
              omni_reference_task_type: reference
              ratio: '16:9'
              duration: 15
              generate_audio: true
              output_format: mov
              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: >-
            输入内容列表。支持 text + image_url(reference_image) +
            video_url(reference_video) + audio_url(reference_audio) 组合
        omni_reference_task_type:
          type: string
          enum:
            - reference
          description: >-
            任务类型，固定为
            reference（参考生视频）。可选值：auto=自动判定、reference=参考生视频、edit=视频编辑、extend=视频延长
        resolution:
          type: string
          enum:
            - 480p
            - 720p
            - 1080p
          default: 720p
          description: 视频分辨率。Seedance 2.5 可选：480p、720p、1080p，默认 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, 30] 或 -1（智能选择）。duration 和 frames 二选一，frames 优先级更高
        generate_audio:
          type: boolean
          default: true
          description: 是否生成同步音频。true=包含人声/音效/背景音乐，false=无声视频。仅 Seedance 2.5/2.0 支持
        output_format:
          type: string
          enum:
            - mp4
            - mov
          default: mp4
          description: 输出格式。mp4=通用格式，mov=高色彩精度（H.264+yuv444p+PCM，适用于专业后期）。仅 Seedance 2.5 支持
        watermark:
          type: boolean
          default: false
          description: 是否添加水印。true=右下角显示「AI 生成」
        return_last_frame:
          type: boolean
          default: false
          description: 是否返回尾帧图像。true=返回 jpeg 格式尾帧，可用于连续视频生成
        draft:
          type: boolean
          default: false
          description: 是否开启样片模式。true=生成 480p 预览视频。仅 Seedance 2.5 支持
        callback_url:
          type: string
          description: 回调地址。任务状态变化时推送 POST 请求，内容与查询 API 返回体一致
        execution_expires_after:
          type: integer
          default: 172800
          description: 任务超时阈值（秒）。范围 [3600, 259200]（1~72 小时），默认 172800（48 小时）
        priority:
          type: integer
          default: 0
          description: 执行优先级。范围 [0, 9]，数值越大优先级越高，默认 0（FIFO）。仅 Seedance 2.5/2.0 支持
        safety_identifier:
          type: string
          description: 终端用户唯一标识符，不超过 64 字符。建议传入哈希处理后的字符串
        tools:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - web_search
                description: 工具类型。web_search=联网搜索，模型自主判断是否搜索互联网内容
          description: 工具配置。仅 Seedance 2.5/2.0 支持
        service_tier:
          type: string
          enum:
            - default
          default: default
          description: 服务等级。default=在线推理，flex=离线推理（价格 50%，Seedance 2.5/2.0 暂不支持）
        seed:
          type: integer
          default: -1
          description: 随机种子。范围 [-1, 2147483647]，-1=随机
        camera_fixed:
          type: boolean
          default: false
          description: 是否固定摄像头。true=固定摄像头（参考图场景不支持）
        frames:
          type: integer
          description: 视频帧数。范围 [29, 289]，需满足 25+4n 格式。与 duration 二选一，frames 优先级更高
      required:
        - model
        - content
        - omni_reference_task_type
    ContentItem:
      type: object
      description: 输入内容项，支持 text、image_url、video_url、audio_url、draft_task 类型
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - text
            text:
              type: string
              description: 文本提示词，中文不超过 500 字，英文不超过 1000 词
          required:
            - type
            - text
        - type: object
          properties:
            type:
              type: string
              enum:
                - image_url
            image_url:
              type: object
              properties:
                url:
                  type: string
                  description: >-
                    图片 URL / Base64 / 素材
                    ID（asset://<ASSET_ID>）。格式：jpeg/png/webp/bmp/tiff/gif/heic/heif，宽高比
                    [0.4, 2.5]，大小 < 30MB
            role:
              type: string
              enum:
                - reference_image
              description: 图片用途，全模态参考场景必填 reference_image
          required:
            - type
            - image_url
        - type: object
          properties:
            type:
              type: string
              enum:
                - video_url
            video_url:
              type: object
              properties:
                url:
                  type: string
                  description: 视频 URL / 素材 ID。格式：mp4/mov，时长 [2, 30]s，大小 ≤ 200MB
            role:
              type: string
              enum:
                - reference_video
              description: 固定为 reference_video
          required:
            - type
            - video_url
            - role
        - type: object
          properties:
            type:
              type: string
              enum:
                - audio_url
            audio_url:
              type: object
              properties:
                url:
                  type: string
                  description: 音频 URL / Base64 / 素材 ID。格式：wav/mp3，时长 [2, 30]s，大小 ≤ 15MB
            role:
              type: string
              enum:
                - reference_audio
              description: 固定为 reference_audio
          required:
            - type
            - audio_url
            - role
        - type: object
          properties:
            type:
              type: string
              enum:
                - draft_task
            draft_task:
              type: object
              properties:
                id:
                  type: string
                  description: 样片任务 ID，有效期 7 天
          required:
            - type
            - draft_task
  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.