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

# OpenAI Sora 2 Text-to-Video API

This is an async API that only returns the task\_id of the async task. Use the task\_id to call the Get Async Task Result API to retrieve the video generation result.

<Tip>
  This is an **async** API that only returns the task\_id of the async task. Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

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

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

## Request Body

<ParamField body="size" type="string" default="720*1280">
  Pixel dimensions of the generated video (width*height). When professional is true (Pro version), supported values: 720*1280, 1280*720, 1024*1792, 1792*1024. When professional is false, supported values: 720*1280, 1280\*720.

  Possible values: `720*1280`, `1280*720`, `1024*1792`, `1792*1024`
</ParamField>

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

  Length limit: 1 - 2000
</ParamField>

<ParamField body="duration" type="integer" default={4}>
  Duration of the generated video (in seconds).

  Possible values: `4`, `8`, `12`
</ParamField>

<ParamField body="professional" type="boolean" default={false}>
  Whether to use the Pro version. If not provided, defaults to false.
</ParamField>

## Response

<ResponseField name="task_id" type="string" required={true}>
  Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
