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

# LTX 2.5 Fast 音频生视频

> LTX 2.5 Fast 音频生视频 API 根据 2–20 秒音频生成同步视频，可用提示词、首帧图片或两者引导画面。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口获取结果。

LTX 2.5 Fast 音频生视频围绕你的音轨生成视频：对白、音乐或环境声决定节奏，提示词、首帧图片或两者决定画面。

LTX 2.5 Fast 是 Lightricks LTX-2.5 视频模型的速度与低成本版本。Vidgo 提供三个模型 ID：[文生视频](https://docs.vidgo.ai/zh/api-manual/video-series/lightricks-ltx-2-5-fast-text-to-video.md)、[图生视频](https://docs.vidgo.ai/zh/api-manual/video-series/lightricks-ltx-2-5-fast-image-to-video.md)和[音频生视频](https://docs.vidgo.ai/zh/api-manual/video-series/lightricks-ltx-2-5-fast-audio-to-video.md)。另一档为 [LTX 2.5 Pro](https://docs.vidgo.ai/zh/api-manual/video-series/lightricks-ltx-2-5-pro-text-to-video.md)。

## 模型

* **lightricks/ltx-2.5-fast/audio-to-video** — LTX 2.5 Fast 音频生视频，音频 2–20 秒。

## 功能

* 通过 `audio_url` 提供 2–20 秒音轨，视频时长与音频一致。
* 可通过 `image_urls` 提供一张首帧图片。
* 提示词最多 5,000 个字符，`image_urls` 为空时必填。
* 宽高比可选 `auto`、`16:9` 或 `9:16`。

## 输入模式

* **音频 + 提示词**：由提示词描述完整画面。
* **音频 + 图片**：图片作为首帧，提示词可选。
* **音频 + 图片 + 提示词**：图片决定画面风格，提示词控制动作。

## 必填参数

* `audio_url` (string)：公开的 HTTP(S) 音频 URL，2–20 秒，最大 100 MB（MP3、WAV、M4A 或 OGG）。

## 可选参数

* `prompt` (string)：画面描述，最多 5,000 个字符。`image_urls` 为空时必填。
* `image_urls` (string\[])：最多一个公开的 HTTP(S) 图片 URL，作为首帧。
* `aspect_ratio` (string)：`auto`、`16:9` 或 `9:16`。默认 `auto`。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口和回调内容的 `files` 数组中返回一个 MP4 视频。

## 示例

* **音频加首帧**：鼓点循环加街头鼓手首帧，9:16。
* **仅音频与提示词**：合唱录音配烛光教堂的提示词。

## 注意事项

* 音频时长须为 2–20 秒，过短或过长返回 400。
* `duration`、`resolution`、`fps`、`generate_audio` 和 `camera_motion` 属于文生和图生模式，在此接口返回 400。
* `model` 和 `callback_url` 放在请求根级，与 `input` 并列。`input` 接收上文列出的字段，其他字段返回 400。
* 积分在提交时预扣，按音频时长（向上取整到整秒）计费。任务失败全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/video-series/lightricks-ltx-2-5-fast-audio-to-video.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - LTX 2.5 Fast 音频生视频
  description: LTX 2.5 Fast 音频生视频 API 根据 2–20 秒音频生成同步视频，可用提示词、首帧图片或两者引导画面。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - LTX 2.5 Fast Audio to Video
      summary: 提交 LTX 2.5 Fast 音频生视频 任务
      operationId: submitLTX25FastAudiotoVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              audio-with-image:
                summary: 音频加首帧
                value:
                  model: lightricks/ltx-2.5-fast/audio-to-video
                  input:
                    prompt: >-
                      A street drummer on a sunlit plaza plays in time with the
                      rhythm while pigeons scatter.
                    image_urls:
                      - https://example.com/start-frame.png
                    audio_url: https://example.com/audio.mp3
                    aspect_ratio: '9:16'
              prompt-only:
                summary: 仅音频与提示词
                value:
                  model: lightricks/ltx-2.5-fast/audio-to-video
                  input:
                    prompt: >-
                      A choir sings in a candlelit stone chapel; the camera
                      drifts slowly down the aisle.
                    audio_url: https://example.com/audio.mp3
      responses:
        '200':
          description: 任务提交结果。任务 ID 标识一项异步任务；生成可能仍在进行中。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: lightricks/ltx-2.5-fast/audio-to-video
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook URL，用于接收完成或失败通知。
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - audio_url
          additionalProperties: false
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 5000
              description: 与音频配合的画面描述，最多 5,000 个字符。`image_urls` 为空时必填。
            image_urls:
              type: array
              minItems: 0
              maxItems: 1
              items:
                type: string
                format: uri
                description: 使用公开可访问的 HTTP(S) 下载链接。
              description: 可选。最多一张图片，作为视频首帧。
            audio_url:
              type: string
              format: uri
              description: >-
                公开可访问的 HTTP(S) 音频 URL（MP3、WAV、M4A 或 OGG，最大 100 MB）。音频时长须为 2–20
                秒，并决定视频时长。
            aspect_ratio:
              type: string
              enum:
                - auto
                - '16:9'
                - '9:16'
              default: auto
              description: 输出宽高比。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: LTX25TASKEXAMPLE
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T08:00:00'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: 错误信息。参见[错误码](/zh/api-manual/error-codes)。
          example: audio_url duration must be between 2 and 20 seconds
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '使用 `Authorization: Bearer VIDGO_API_KEY`。'

````

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