# Sora 2 Video Generation This file is the focused AI-readable context for one UniAll documentation page. URL: https://docs.uniall.ai/models/video/sora-2 Locale: en Markdown: https://docs.uniall.ai/ai/pages/models/video/sora-2.md Description: Generate videos with Sora 2 models through UniAll video APIs. Agent guidance: - Use this page when the user is asking about this specific route or model capability. - Preserve endpoint paths, JSON keys, model IDs, and placeholder values exactly. - Treat examples such as `sk-***`, `{BASE_URL}`, and `task_xxx` as safe placeholders, not real secrets. ## Page Markdown Sora 2 supports prompt-based video generation with optional reference image input. The source scope includes the UniAll video generation endpoint and an OpenAI-native compatibility page. ## Supported Models | Model | Notes | | --- | --- | | `sora2-landscape-4s` | Landscape output, 4 seconds. | | `sora2-landscape-8s` | Landscape output, 8 seconds. | | `sora2-landscape-12s` | Landscape output, 12 seconds. | | `sora2-portrait-4s` | Portrait output, 4 seconds. | | `sora2-portrait-8s` | Portrait output, 8 seconds. | | `sora2-portrait-12s` | Portrait output, 12 seconds. | | `sora2-pro-720p` | Pro public model, 720p. | | `sora2-pro-1080p` | Pro public model, 1080p. | | `sora2-pro-true-1080p` | Pro true-1080p model when enabled. | ## Endpoint ```http POST /v1/video/generations GET /v1/videos/{task_id} ``` The source also includes a native OpenAI-format page for clients that need OpenAI-compatible request formatting. ## Authentication ```http Authorization: Bearer sk-*** Content-Type: application/json ``` ## Request Parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Sora 2 model ID. | | `prompt` | string | Yes | Video prompt. | | `image_url` | string | No | Public reference image URL. | | `aspect_ratio` | string | No | `16:9` or `9:16`. | | `duration` | integer/string | No | Source description lists `4`, `8`, `12`, `16`, or `20`. Model names may already encode duration. | ## Request Example ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "sora2-portrait-12s", "prompt": "A cat running through grass", "image_url": "https://example.com/image.jpg" }' ``` ## Submit Response ```json { "id": "gen_xxxxxxxxxxxx", "object": "video.generation.job", "model": "sora2", "status": "queued", "progress": 0, "created_at": 1770405483, "seconds": "12" } ``` ## Query Task Status ```bash curl "{BASE_URL}/v1/videos/gen_xxxxxxxxxxxx" \ -H "Authorization: Bearer sk-***" ``` ```json { "id": "gen_xxxxxxxxxxxx", "object": "video.generation.job", "model": "sora2-portrait-12s", "status": "completed", "progress": 100, "video_url": "https://example.com/output.mp4", "seconds": "12" } ``` ## Billing Notes Sora 2 billing depends on model, duration, orientation, resolution, and whether a Pro model is selected. Use the current model pricing surface and task settlement record as the source of truth. ## Common Errors - Passing an unsupported Sora 2 model ID. - Sending a private or expired `image_url`. - Passing an `aspect_ratio` that conflicts with a landscape or portrait model name. - Treating a queued task as complete before polling finishes. - Mixing UniAll task format and native OpenAI format in one request. ## Related Pages - [Video Generation Overview](/models/video/overview) - [Wan 2.6 Video Generation](/models/video/wan-2-6) - [Models](/models)