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

# OpenAI Video Format

> Use the OpenAI-compatible video API format to create, query, and download videos

> Дата обновления: 2026-06-06

# OpenAI Video Format

Crazyrouter supports the official OpenAI video API format, compatible with the OpenAI SDK.

## Create Video

```
POST /v1/videos
```

### Request Parameters

| Parameter    | Type    | Required | Description                                       |
| ------------ | ------- | -------- | ------------------------------------------------- |
| `model`      | string  | Yes      | Model name, e.g. `sora-2`, `sora-2-pro`           |
| `prompt`     | string  | Yes      | Video description prompt                          |
| `size`       | string  | No       | Video size: `1920x1080`, `1080x1920`, `1080x1080` |
| `duration`   | integer | No       | Video duration (seconds)                          |
| `image_url`  | string  | No       | Reference image URL                               |
| `storyboard` | array   | No       | Storyboard script                                 |
| `private`    | boolean | No       | Whether to use private mode                       |

### Request Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.crazyrouter.com/v1/videos \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{
      "model": "sora-2",
      "prompt": "A timelapse of a city skyline from day to night, clouds moving quickly",
      "size": "1920x1080",
      "duration": 10
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.crazyrouter.com/v1/videos",
      headers={
          "Content-Type": "application/json",
          "Authorization": "Bearer YOUR_API_KEY"
      },
      json={
          "model": "sora-2",
          "prompt": "A timelapse of a city skyline from day to night",
          "size": "1920x1080",
          "duration": 10
      }
  )

  print(response.json())
  ```
</CodeGroup>

### Response Example

```json theme={null}
{
  "code": "success",
  "message": "",
  "data": {
    "id": "video_abc123",
    "task_id": "video_abc123",
    "status": "processing"
  }
}
```

***

## Query Video

```
GET /v1/videos/{id}
```

```bash cURL theme={null}
curl https://api.crazyrouter.com/v1/videos/video_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response Example (Completed)

```json theme={null}
{
  "id": "video_abc123",
  "object": "video",
  "status": "SUCCESS",
  "created_at": 1709123456,
  "video": {
    "url": "https://crazyrouter.com/files/video_abc123.mp4",
    "duration": 10,
    "width": 1920,
    "height": 1080
  }
}
```

***

## Download Video

```
GET /v1/videos/{id}/content
```

Download the video file directly.

```bash cURL theme={null}
curl -o output.mp4 https://api.crazyrouter.com/v1/videos/video_abc123/content \
  -H "Authorization: Bearer YOUR_API_KEY"
```

***

## Edit Video

Pass `image_url` in the create request for image-to-video:

```json theme={null}
{
  "model": "sora-2",
  "prompt": "The scene comes to life with gentle movement",
  "image_url": "https://example.com/scene.jpg",
  "size": "1920x1080",
  "duration": 5
}
```

***

## Storyboard

```json theme={null}
{
  "model": "sora-2",
  "storyboard": [
    {"prompt": "Wide shot of a forest at dawn", "duration": 3},
    {"prompt": "A deer walks into frame", "duration": 4},
    {"prompt": "Close-up of the deer looking at camera", "duration": 3}
  ],
  "size": "1920x1080"
}
```

***

## Private Mode

Set `private: true` so the generated video won't appear in the public gallery:

```json theme={null}
{
  "model": "sora-2",
  "prompt": "A confidential product demo video",
  "size": "1920x1080",
  "private": true
}
```

### Task Status

| Status       | Description |
| ------------ | ----------- |
| `processing` | Processing  |
| `SUCCESS`    | Completed   |
| `failed`     | Failed      |
