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

# 天幕文生视频

文生视频接口。输入文字提示词生成 5 秒视频，支持运镜控制

<Tip>
  这是一个**异步**API，只会返回异步任务的 task\_id。您应该使用该 task\_id 请求 [查询任务结果 API](/models/reference-get-async-task-result) 来检索视频生成结果。
</Tip>

## 请求头

<ParamField header="Content-Type" type="string" required={true}>
  枚举值: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer 身份验证格式，例如：Bearer \{\{API 密钥}}。
</ParamField>

## 请求体

<ParamField body="params" type="string">
  透明参数
</ParamField>

<ParamField body="prompt" type="string" required={true}>
  提示词：支持中英文，长度不超过1000字符。建议包含主体+动作+镜头说明。

  长度限制：0 - 1000
</ParamField>

<ParamField body="duration" type="integer" default={5}>
  视频时长，目前仅支持 5 秒

  可选值：`5`
</ParamField>

<ParamField body="resolution" type="string" default="720p">
  视频分辨率，目前仅支持 720p

  可选值：`720p`
</ParamField>

<ParamField body="aspect_ratio" type="string" default="16:9">
  宽高比

  可选值：`16:9`, `9:16`, `4:3`, `3:4`, `1:1`
</ParamField>

<ParamField body="camera_move_index" type="integer">
  运镜控制 (1-46)。1:orbit, 2:spin, 9:static等。

  取值范围：\[1, 46]
</ParamField>

## 响应

<ResponseField name="msg" type="string">
  响应消息
</ResponseField>

<ResponseField name="code" type="integer">
  响应状态码
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ResponseField name="task_id" type="string">
      异步任务ID，用于查询视频生成结果
    </ResponseField>
  </Expandable>
</ResponseField>
