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

# Sora 2

> Sora 2: video generation model with synchronized audio. Request examples and parameters for MixRoute.

Sora 2 generates video with synchronized audio. The MixRoute route uses `POST /v1/video/generations` with the Sora creation fields below.

<Warning>
  OpenAI has scheduled shutdown of the Sora 2 models and Videos API for September 24, 2026. Confirm MixRoute route access before integration; a model ID in the catalog alone does not guarantee an enabled video route or continued availability after the upstream shutdown.
</Warning>

## Request Parameters

| Field | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | Use `sora-2`. |
| `prompt` | string | Yes | Describe the scene, movement, and desired audio. |
| `seconds` | string | No | Clip duration: "4", "8", or "12"; default "4". This is a string, not a duration integer. |
| `size` | string | No | Use `720x1280` (default, portrait) or `1280x720` (landscape) for Sora 2. Do not infer square output or Pro-only sizes. |
| `input_reference` | object \| file | No | Native first-frame input: JSON object with image\_url or file\_id, or a multipart upload. Media-input support must be enabled on the selected MixRoute route. |

These fields are top-level Sora fields. Do not replace them with Seedance-style `duration`, `resolution`, or `aspect_ratio`, and do not wrap them in `metadata`.

An image reference must match the requested size and use JPEG, PNG, or WebP. In JSON, the native shape is `input_reference: {"image_url": "..."}` or `input_reference: {"file_id": "..."}`, not a top-level image\_url. A file ID must be accessible to the upstream account.

Remixing is a separate video operation, not a `remix_url` field on a creation request. Do not reuse an arbitrary source URL as that field.

## Text-to-Video

Set the environment variable `MIXROUTE_API_KEY` before calling.

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "sora-2",
  "prompt": "A red paper square slowly rotates on a plain white background.",
  "seconds": "4",
  "size": "720x1280"
}'
```

### Python

```python theme={null}
import json
import os
import requests

payload = json.loads(r'''
{
  "model": "sora-2",
  "prompt": "A red paper square slowly rotates on a plain white background.",
  "seconds": "4",
  "size": "720x1280"
}
''')
response = requests.post(
    "https://api.mixroute.ai/v1/video/generations",
    headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
    json=payload,
    timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
    raise RuntimeError(result.get("message") or result)
print(result)
```

## Workflow

1. Submit to an enabled Sora route and retain the returned MixRoute task ID.
2. Poll [Query Video Task](/api-reference/endpoint/query-video-task) until success or a terminal failure.
3. Use the returned result URL or [Download Video](/api-reference/endpoint/download-video) for routes that require the separate download endpoint.

An HTTP error or an application-level error is not a created task. A platform-routing error requires route configuration; changing the prompt or adding undocumented fields does not resolve it.


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