Skip to main content

Sora

OpenAI Sora supports multiple calling formats: Unified Video API, OpenAI Video format, and native format.

Via Unified Video API

POST /v1/video/create
cURL
curl -X POST https://crazyrouter.com/v1/video/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sora",
    "prompt": "A cat playing piano in a jazz club, cinematic lighting",
    "aspect_ratio": "16:9"
  }'

Via OpenAI Video Format

POST /v1/videos
cURL
curl -X POST https://crazyrouter.com/v1/videos \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sora",
    "prompt": "A cat playing piano in a jazz club, cinematic lighting",
    "size": "1920x1080",
    "duration": 10
  }'

Response Example

{
  "id": "sora_task_abc123",
  "status": "processing",
  "created_at": 1709123456
}

Image-to-Video

Pass a reference image to generate video:
cURL
curl -X POST https://crazyrouter.com/v1/videos \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sora",
    "prompt": "The person in the image starts dancing",
    "image_url": "https://example.com/portrait.jpg",
    "size": "1920x1080"
  }'

Pro Mode

Use sora-pro for higher quality output:
{
  "model": "sora-pro",
  "prompt": "An epic battle scene in a fantasy world",
  "size": "1920x1080",
  "duration": 20
}

Character Creation

POST /sora/v1/characters
Create reusable characters to maintain consistency across videos.
cURL
curl -X POST https://crazyrouter.com/sora/v1/characters \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "name": "Luna",
    "description": "A young woman with long silver hair and blue eyes",
    "reference_images": ["https://example.com/character_ref.jpg"]
  }'

Storyboard Support

Define multi-scene videos using storyboards:
cURL
curl -X POST https://crazyrouter.com/v1/videos \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sora",
    "storyboard": [
      {
        "prompt": "A sunrise over the mountains",
        "duration": 5
      },
      {
        "prompt": "Camera pans down to reveal a village",
        "duration": 5
      },
      {
        "prompt": "Close-up of a farmer starting their day",
        "duration": 5
      }
    ],
    "size": "1920x1080"
  }'

Query Task

GET /v1/videos/{task_id}
cURL
curl https://crazyrouter.com/v1/videos/sora_task_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "id": "sora_task_abc123",
  "status": "completed",
  "video": {
    "url": "https://crazyrouter.com/files/sora_abc123.mp4",
    "duration": 10,
    "width": 1920,
    "height": 1080
  }
}
Sora Pro mode takes longer to generate but produces higher quality results. Storyboard mode is ideal for videos that require coherent multi-scene narratives.