Skip to main content

Overview

Sora 2 Official API is API Yi’s transparent proxy service for OpenAI’s official API. Unlike reverse-engineered channels, the Official API directly calls OpenAI’s official endpoints, providing higher stability, more precise instruction following, and clearer video quality.
Official Channel: This is a transparent proxy to OpenAI’s official API. All requests are sent directly to OpenAI servers for processing, ensuring the best generation quality and stability.

Official vs Reverse-Engineered Comparison

ComparisonOfficial APIReverse-Engineered
Stability99.99% availabilitySubject to risk control, occasional fluctuations
Instruction FollowingHigh precisionModerate
Video QualityConsistently clearOccasionally blurry
Video Duration4/8/12 seconds10/15 seconds
PricingPer-second billing (higher)Per-request billing (lower)
Call MethodAsync onlySync streaming / Async
Async Recommended: For both Official and Reverse-Engineered channels, async calls are recommended for better stability and no charges on errors.

Key Features

Direct Official Connection

OpenAI official API transparent proxy, no intermediate processing

Ultimate Stability

99.99% service availability, no risk control issues

High Precision Output

Precise instruction following, consistently clear quality

Flexible Billing

Per-second billing, more economical for on-demand use

Pricing

sora-2 (Standard)

Official model docs: platform.openai.com/docs/models/sora-2
ResolutionRate4 sec8 sec12 sec
720×1280 (Portrait)$0.1/sec$0.4$0.8$1.2
1280×720 (Landscape)$0.1/sec$0.4$0.8$1.2

sora-2-pro (Professional)

Official model docs: platform.openai.com/docs/models/sora-2-pro
ResolutionRate4 sec8 sec12 sec
720×1280 / 1280×720$0.3/sec$1.2$2.4$3.6
1024×1792 / 1792×1024$0.5/sec$2.0$4.0$6.0
  • Official channel bills by video duration (seconds), not per request
  • With async calls, failed generations are not charged (e.g., server overload errors)
  • Videos are stored for 1 day, please download promptly

Requirements

Important: Please complete the following configuration before using the Official channel, otherwise API calls will fail.
1

Log in to Console

Visit api.apiyi.com and log in to your account
2

Select Group: Sora2 Official

In the API Key Management page, set the group to Sora2官转 (Sora2 Official)
Different groups correspond to different channels and billing methods. Make sure to select the correct one.
3

Set Billing Mode: Usage-Based

In API Key Settings, set the billing mode to 按量计费 (Usage-Based)
Per-request billing cannot access the Official channel. You must use usage-based billing.
4

Ensure Sufficient Balance

Official channel pricing is higher, please ensure your account has sufficient balance

API Reference

Endpoint

https://api.apiyi.com/v1/videos
Official API docs: platform.openai.com/docs/api-reference/videos/create

Call Flow (3-Step Async)

The Official channel only supports async calls, requiring three steps:
  1. Submit Request → Get task ID
  2. Poll Status → Check generation progress
  3. Download Video → Get the final video

Step 1: Submit Generation Request

Text-to-Video

curl -X POST "https://api.apiyi.com/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "A golden retriever running on the beach at sunset, golden sunlight reflecting on the ocean",
    "seconds": "8",
    "size": "1280x720"
  }'

Image-to-Video (Optional)

Use the input_reference parameter to upload a reference image for image-to-video generation.
Image resolution must match the size parameter. For example, if size: "1280x720", the image must also be 1280×720.
curl -X POST "https://api.apiyi.com/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=sora-2" \
  -F "prompt=Animate this scene, gentle waves lapping against the sandy beach" \
  -F "seconds=8" \
  -F "size=1280x720" \
  -F "input_reference=@/path/to/image.jpg"

Step 2: Poll Task Status

curl -X GET "https://api.apiyi.com/v1/videos/{task_id}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Step 3: Download Video

import urllib.request

if video_url:
    urllib.request.urlretrieve(video_url, "output_video.mp4")
    print("Video saved to output_video.mp4")

Request Parameters

ParameterTypeRequiredDescription
modelstringNoModel name: sora-2 (default) or sora-2-pro
promptstringYesVideo description prompt
input_referencefileNoOptional reference image for image-to-video. Only 1 file supported, and image resolution must match video resolution
secondsstringNoVideo duration, options: 4/8/12, default: 4
sizestringNoOutput resolution, e.g., 720x1280, 1280x720, 1024x1792, 1792x1024, default: 720x1280
Image-to-Video Note: When using input_reference, the reference image resolution must exactly match the video resolution specified in the size parameter, otherwise you’ll get an error: Inpaint image must match the requested width and height

Response Format

Submit Request Response

{
  "id": "video_123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1712697600,
  "size": "1280x720",
  "seconds": "8",
  "quality": "standard"
}

Status Query Response

{
  "id": "video_123",
  "object": "video",
  "model": "sora-2",
  "status": "completed",
  "progress": 100,
  "created_at": 1712697600,
  "size": "1280x720",
  "seconds": "8",
  "quality": "standard",
  "video_url": "https://cdn.example.com/video.mp4"
}

Status Definitions

StatusDescription
queuedTask submitted, waiting in queue
in_progressVideo is being generated
completedGeneration complete, ready for download
failedGeneration failed

FAQ

Official API: Directly calls OpenAI’s official API with high stability, good quality, and precise instruction following, but at a higher price with per-second billing.Reverse-Engineered: Interface implemented through reverse engineering. Lower price with per-request billing, but may be affected by risk control, with slight variations in stability and quality.
The Official API directly interfaces with OpenAI’s official API, which uses async task mode for video generation. Standard version typically takes 3-5 minutes, while Pro version may take up to 10 minutes depending on complexity. Async mode avoids long connection timeouts and is more stable and reliable.
The Official API currently supports 4, 8, and 12 second duration options. Unlike the 10/15 seconds of reverse-engineered channels, these are the native durations supported by the official API.
API Yi offers various recharge bonus tiers. See Recharge Promotions for details.
With async calls, failed video generations are not charged. However, please ensure your input content is compliant and lawful to avoid resource waste and disputes.
Videos are stored on CDN for 1 day. Please download them promptly after generation. The video links will expire after this period.