Overview
Sora 2 is OpenAI’s flagship video generation series, producing 4–12 second high-fidelity clips with synchronized audio from text prompts or reference images. APIYI provides a transparent proxy (official-relay) channel that forwards requests directly to OpenAI’s/v1/videos endpoint with identical request and response semantics.
Text-to-Video API
POST /v1/videos, generate video from text only — JSON request body, the simplest entry point.Image-to-Video API
POST /v1/videos + multipart upload of input_reference to animate a static image into a clip.Why APIYI’s Sora 2 Official Relay?
Drop-in replacement for the OpenAI official channel, optimized for production scenarios across stability, integration friction, and cost:Direct Official Connection · 99.99% Uptime
/v1/videos — no intermediate processing, no protocol bypass risk. Request and response behavior matches the upstream exactly. No need to manage OpenAI account tiers or risk-control fluctuations.Unlimited Concurrency · Production Scale
Same Per-Second Pricing + Top-Up Bonuses
Global Zero-Friction Access
api.apiyi.com directly from Mainland China data centers, residential networks, or overseas nodes. Skip the OpenAI cross-border setup entirely.OpenAI-Compatible · Zero Code Changes
/v1/videos matches OpenAI exactly. Point the official OpenAI SDK to APIYI’s base_url and call as-is — parameter and field names align one-to-one.Professional Support · Enterprise Onboarding
Key Features
Synchronized Audio + Video
Multi-Resolution Tiers
sora-2 supports 720p (720x1280 / 1280x720); sora-2-pro adds 1024p and 1080p tiers up to 1920x1080.Flexible 4 / 8 / 12 Second Durations
Precise Instruction Following
Image-to-Video (input_reference)
Async Task Model
video_id immediately. Poll status independently and download the final video — ideal for batch management and resume-on-failure flows.OpenAI SDK Drop-In
base_url=https://api.apiyi.com/v1 works as a drop-in replacement for the official OpenAI SDK.Failures Are Free
Pricing
Billed by video duration in seconds, identical to OpenAI official rates.sora-2-pro has three resolution tiers, each with distinct per-second pricing.
sora-2 (Standard)
| Resolution | Rate | 4 sec | 8 sec | 12 sec |
|---|---|---|---|---|
720x1280 / 1280x720 | $0.10/sec | $0.40 | $0.80 | $1.20 |
sora-2-pro (Pro)
| Resolution | Rate | 4 sec | 8 sec | 12 sec |
|---|---|---|---|---|
720x1280 / 1280x720 | $0.30/sec | $1.20 | $2.40 | $3.60 |
1024x1792 / 1792x1024 | $0.50/sec | $2.00 | $4.00 | $6.00 |
1080x1920 / 1920x1080 | $0.70/sec | $2.80 | $5.60 | $8.40 |
- Charged by actual generated seconds (
seconds× rate), independent of prompt length or whetherinput_referenceis provided - In async mode, failed generations / content-policy rejections / capacity errors are all not billed
- Requests must use the usage-based billing mode in your APIYI console (switch under API Key settings); per-request billing groups cannot route to the official-relay channel
- Top-up bonus tiers are listed under Top-Up Promotions
Technical Specs
| Dimension | sora-2 | sora-2-pro |
|---|---|---|
| Model ID | sora-2 | sora-2-pro |
| Current snapshot | sora-2-2025-12-08 | Synced with alias |
| Deprecated snapshot | sora-2-2025-10-06 | — |
| Supported resolutions | 720x1280 / 1280x720 | 720x1280 / 1280x720 / 1024x1792 / 1792x1024 / 1080x1920 / 1920x1080 |
| Supported durations (seconds) | 4 / 8 / 12 | 4 / 8 / 12 |
| Audio track | ✅ Synchronized | ✅ Synchronized |
| Image-to-video (input_reference) | ✅ | ✅ |
| Typical generation time | 3–5 minutes | 5–10 minutes |
| Video retention | 1 day | 1 day |
| Response fields | id / status / progress; download via /v1/videos/{id}/content | Same |
API Endpoints
| Endpoint | Method | Purpose | Content-Type |
|---|---|---|---|
/v1/videos | POST | Submit a video generation task (text-to-video and image-to-video) | application/json or multipart/form-data |
/v1/videos/{video_id} | GET | Poll task status and progress | — |
/v1/videos/{video_id}/content | GET | Download the generated video file | — |
Key Parameters
seconds (Video Duration)
Only three string-typed enum values (not numbers):
| Value | Meaning | Use Case |
|---|---|---|
"4" | 4 seconds (default) | Short demos, single shots, quick prompt iteration |
"8" | 8 seconds | Standard short-form video, social-media clips |
"12" | 12 seconds | Long shots, continuous action, narrative sequences |
size (Output Resolution)
Supported tiers differ between sora-2 and sora-2-pro:
| Tier | Pixels | sora-2 | sora-2-pro |
|---|---|---|---|
| 720p Portrait | 720x1280 | ✅ | ✅ ($0.30/sec) |
| 720p Landscape | 1280x720 | ✅ | ✅ ($0.30/sec) |
| 1024p Portrait | 1024x1792 | ❌ | ✅ ($0.50/sec) |
| 1024p Landscape | 1792x1024 | ❌ | ✅ ($0.50/sec) |
| 1080p Portrait | 1080x1920 | ❌ | ✅ ($0.70/sec) |
| 1080p Landscape | 1920x1080 | ❌ | ✅ ($0.70/sec) |
Best Practices
Pick the model that matches your need
- Cost-conscious →
sora-2(720p only, $0.10/sec, $0.40 for a 4-sec clip) - Need 1080p Full HD / strongest instruction following →
sora-2-pro(up to $0.70/sec, supports1920x1080) - Internal demos / first iterations → start with
sora-24 seconds
Validate at 4 seconds before scaling duration
seconds: "4" first to verify camera direction, style, and overall composition (~3 minutes, $0.40). Only scale to 8 / 12 seconds once the look is locked.Switch to usage-based billing first
Use async polling, not synchronous waits
video_id, poll /v1/videos/{id} every 10–30 seconds until status: "completed", then download from /v1/videos/{id}/content.Set client timeout to 30+ seconds
input_reference uploads, large images extend connection time — start with a 30-second timeout.Download videos immediately
/content returns 404. Production flows must persist to your own OSS / CDN as soon as status: "completed".Error Codes & Retries
| Status | Meaning | Recommended Action |
|---|---|---|
400 | Invalid parameters (seconds not in 4/8/12, size not supported, input_reference dimensions mismatch) | Validate parameters; pre-crop reference images to the target resolution |
401 | Invalid token | Check your Bearer Token and group setting (must be Sora2官转) |
403 | Content-policy rejection / wrong billing mode | Adjust prompt; confirm API Key is on usage-based billing |
429 | Rate limit / insufficient balance | Exponential backoff; usable immediately after top-up |
5xx | Gateway / upstream error | Retry the async task 1–2 times (no charge) |
Task failed | Generation failed (mostly content policy or upstream capacity) | Adjust prompt and retry; the failed task is not billed |
- POST submission timeout: 30 seconds (longer for multipart uploads)
- GET polling interval: 10–30 seconds, max wait 15 minutes (Pro 1080p 12 seconds may take 8–10 minutes)
- Exponential backoff retries on 5xx and
failedtasks (recommend 2 retries) - Log the
x-request-idresponse header for debugging
FAQ
Official-relay vs reverse-engineered — what's the difference, and is reverse-engineered still available?
Official-relay vs reverse-engineered — what's the difference, and is reverse-engineered still available?
/v1/videos, with request/response fields matching upstream. Per-second billing, 99.99% uptime, requires usage-based billing group.Reverse-engineered: A reverse-engineered Sora 2 interface, billed per-request and cheaper, but subject to OpenAI risk control. As of January 2026 OpenAI policy adjustment, free accounts were disabled and APIYI now offers only the official-relay channel. Contact sales for special needs.Why must I switch to usage-based billing?
Why must I switch to usage-based billing?
Why is async-only? Is there a sync streaming option?
Why is async-only? Is there a sync streaming option?
/v1/videos endpoint is itself async task-based — there’s no SSE or WebSocket streaming. Generating a 4-second clip typically takes 3–5 minutes; 12 seconds can take 8–10 minutes. Synchronous waits would hang HTTP connections for too long and become unreliable. Always use the POST → poll → download flow.Which seconds values are supported? Why can't I pass 10 / 15?
Which seconds values are supported? Why can't I pass 10 / 15?
"4" / "8" / "12" as enum string values. The 10 / 15 second values were unofficial durations from the older reverse-engineered channel and are not supported by the official relay. If your code passes "10", change it to "8" or "12".Is the \$0.70/sec for sora-2-pro 1080p new?
Is the \$0.70/sec for sora-2-pro 1080p new?
sora-2-pro to include 1080x1920 / 1920x1080 Full HD at $0.70/sec. The prior 720p ($0.30) and 1024p ($0.50) tiers are unchanged. Our pricing table above reflects the latest official rates.How long are videos retained?
How long are videos retained?
/v1/videos/{id}/content returns 404 / 410. Production flows must download and persist to your own OSS / CDN immediately after status: "completed".Are failed generations billed?
Are failed generations billed?
failed, content-policy rejections, capacity errors, and parameter errors are all not billed. Only tasks that actually complete (status: "completed") and produce a video file are billed by seconds rate.Can I use the official OpenAI SDK directly?
Can I use the official OpenAI SDK directly?
videos namespace. Point base_url at https://api.apiyi.com/v1:Does input_reference accept base64?
Does input_reference accept base64?
input_reference is a multipart/form-data file upload field (accepts image/jpeg / image/png / image/webp) and requires a multipart request. If your image is base64, decode and write to a temp file first. See Image-to-Video.Can I disable the audio track?
Can I disable the audio track?
ffmpeg -an after download.Can I cancel a running task?
Can I cancel a running task?
/v1/videos endpoint does not provide a cancel operation — once submitted, a task runs to completion. Validate prompts at seconds: "4" first to avoid wasting long-duration runs.What are the rate limits?
What are the rate limits?
Can I run multiple tasks in parallel?
Can I run multiple tasks in parallel?
/v1/videos returns an independent video_id. Submit and poll in parallel; manage your video_id list in a task queue to avoid polling storms.Related Docs
- Text-to-Video Playground —
POST /v1/videos(JSON) interactive debugger with 5 language samples - Image-to-Video Playground —
POST /v1/videos(multipart) +input_referencewalkthrough - Top-Up Promotions — Bonus tiers and applicable channels
- API Manual — General request, timeout, and retry guidance
- OpenAI official model page:
platform.openai.com/docs/models/sora-2 - OpenAI official API reference:
platform.openai.com/docs/api-reference/videos/create