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

# OpenAI Sora 2 文生视频

OpenAI Sora 2 是一款最先进的视频+音频生成器。它在原有 Sora 基础上进行了改进，具备更精确的物理效果、更清晰的真实感、同步的音频、更强的可操控性以及更广泛的风格范围。

<Tip>
  这是一个**异步**API，只会返回异步任务的 task\_id。您应该使用该 task\_id 请求 [查询任务结果 API](/docs/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="prompt" type="string" required={true}>
  视频生成的正面文本提示。
</ParamField>

<ParamField body="size" type="string" required={false}>
  生成视频的像素大小（宽度\*高度）。

  枚举值：

  * professional 为 true（Pro 版）：`720*1280`、`1280*720`、`1024*1792`、`1792*1024`。
  * professional 为 false： `720*1280`、`1280*720`。

  默认：`720*1280`。
</ParamField>

<ParamField body="duration" type="integer" required={false}>
  生成视频的时长（秒）。

  枚举值：`4`、`8`、`12`。

  默认：`4`。
</ParamField>

<ParamField body="professional" type="bool" default={false}>
  该参数支持是否使用 Pro 版本。如果未提供，则默认值为 false。
</ParamField>

## 响应信息

<ResponseField name="task_id" type="string" required={true}>
  异步任务的 task\_id。您应该使用该 task\_id 请求 [查询任务结果 API](/docs/models/reference-get-async-task-result) 以获取生成结果
</ResponseField>
