> ## 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 is a video generation model with synchronized audio from OpenAI.

Call `sora-2` through MixRoute using the endpoint shown below.

## Key capabilities

* Text-to-video - Generate a video from a text prompt
* Image-to-video - Use an image as a first frame or reference
* Asynchronous workflow - Submit a task, then poll for the result
* Video remix - Create a variation from a source video URL

## Output specifications

| Property           | Value             |
| ------------------ | ----------------- |
| Resolution         | 480p, 720p, 1080p |
| Aspect ratio       | 16:9, 9:16, 1:1   |
| Duration           | 5, 10, 15, 20 s   |
| Synchronized audio | Supported         |
| Workflow           | Asynchronous task |

## Workflow

```text theme={null}
1. POST /v1/video/generations -> task_id
2. GET /v1/video/generations/{task_id} -> status
3. When the task succeeds -> read the video URL
```

## Examples

### Text-to-video

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/video/generations" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "sora-2",
      "prompt": "A red square gently pulses on a clean white background",
      "duration": 5,
      "resolution": "720p",
      "aspect_ratio": "16:9"
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.post(
        "https://api.mixroute.ai/v1/video/generations",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={'model': 'sora-2',
              'prompt': 'A red square gently pulses on a clean white background',
              'duration': 5,
              'resolution': '720p',
              'aspect_ratio': '16:9'},
    )

    print(response.json())
    ```
  </Tab>
</Tabs>

### Image-to-video

```bash theme={null}
curl "https://api.mixroute.ai/v1/video/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sora-2",
  "prompt": "Animate the reference image with a slow camera push-in",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "image_url": "https://example.com/reference.png"
}'
```

### Video remix

```bash theme={null}
curl "https://api.mixroute.ai/v1/video/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sora-2",
  "prompt": "Keep the composition while changing the lighting to a warm sunset",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "remix_url": "https://example.com/source.mp4"
}'
```

## Parameters

| Parameter      | Type    | Required | Description                               |
| -------------- | ------- | -------- | ----------------------------------------- |
| `model`        | string  | Yes      | Must be `sora-2`.                         |
| `prompt`       | string  | Yes      | Video generation or remix instruction.    |
| `duration`     | integer | No       | Video duration: 5, 10, 15, or 20 seconds. |
| `resolution`   | string  | No       | 480p, 720p, or 1080p.                     |
| `aspect_ratio` | string  | No       | 16:9, 9:16, or 1:1.                       |
| `image_url`    | string  | No       | Reference image URL for image-to-video.   |
| `remix_url`    | string  | No       | Source video URL for remix mode.          |

### Input modes

| Mode           | Inputs              |
| -------------- | ------------------- |
| Text-to-video  | prompt              |
| Image-to-video | prompt + image\_url |
| Video remix    | prompt + remix\_url |
