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

# OpenAI Sora 2 — Text to Video

> Generate a short video with synchronized audio from a text prompt at 720p.

|              |                     |
| ------------ | ------------------- |
| **Model ID** | `openai/sora-2-t2v` |
| **Family**   | `sora-2`            |
| **Task**     | `text-to-video`     |
| **Modality** | Video               |
| **Upstream** | OpenAI Sora 2       |

<Note>
  Need 1080p output? Use the
  [Sora 2 Pro Text-to-Video](/openai-sora-2-pro-api/text-to-video)
  variant (`openai/sora-2-pro-t2v`). Pricing differs significantly.
</Note>

## Endpoint

```http theme={null}
POST https://routerbase.com/v1/videos/generations
```

Async — returns `{id, status: "pending"}`; poll
`GET /v1/videos/generations/{id}` until `success` or `failed`.

## Parameters

<ParamField body="prompt" type="string" required>
  Text prompt describing the desired video. Sora 2 also synthesizes
  audio cues from the prompt — describing sound design (e.g. "ambient
  rain") tends to produce richer results. **Maximum 2000 characters** —
  longer prompts are rejected with `400 invalid_request_error`.
</ParamField>

<ParamField body="duration" type="&#x22;4&#x22; | &#x22;8&#x22; | &#x22;12&#x22;" default="&#x22;4&#x22;">
  Length of the generated clip in seconds. This is the only price
  lever — see [pricing](/openai-sora-2-api/quickstart#pricing).
</ParamField>

## Example

```bash theme={null}
curl https://routerbase.com/v1/videos/generations \
  -H "Authorization: Bearer $ROUTERBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/sora-2-t2v",
    "prompt": "a calm beach at sunrise, gentle waves, soft ambient sound",
    "duration": "8"
  }'
```

```json theme={null}
{ "id": "vid_abc123…", "status": "pending", "model": "openai/sora-2-t2v" }
```

Poll until terminal:

```bash theme={null}
curl https://routerbase.com/v1/videos/generations/vid_abc123… \
  -H "Authorization: Bearer $ROUTERBASE_API_KEY"
```

```json theme={null}
{
  "id": "vid_abc123…",
  "status": "success",
  "data": [{ "url": "https://…mp4" }]
}
```

<Note>
  Try it live in the
  [Sora 2 Playground](https://routerbase.com/models/openai/sora-2/text-to-video).
</Note>
