> ## 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 Text-to-Video

OpenAI Sora 2 is a state-of-the-art video + audio generator. It improves on the original Sora with more accurate physics, sharper realism, synchronized audio, greater controllability, and a broader range of styles.

<Tip>
  This is an **asynchronous** API and only returns the task\_id of the asynchronous task. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the video generation result.
</Tip>

## Request Headers

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

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="prompt" type="string" required={true}>
  The positive text prompt for video generation.
</ParamField>

<ParamField body="size" type="string" required={false}>
  The pixel size of the generated video (width\*height).

  Enum values:

  * When professional is true (Pro version): `720*1280`, `1280*720`, `1024*1792`, `1792*1024`.
  * When professional is false: `720*1280`, `1280*720`.

  Default: `720*1280`.
</ParamField>

<ParamField body="duration" type="integer" required={false}>
  The duration of the generated video (seconds).

  Enum values: `4`, `8`, `12`.

  Default: `4`.
</ParamField>

<ParamField body="professional" type="bool" default={false}>
  This parameter specifies whether to use the Pro version. If it is not provided, the default value is false.
</ParamField>

## Response Information

<ResponseField name="task_id" type="string" required={true}>
  The task\_id of the asynchronous task. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to obtain the generation result.
</ResponseField>
