What is the Sora2 API?
The **Sora2 API** on UniAll AI provides programmatic access to the public model id `sora2`, a video generation model that supports both **text-to-video** and **reference image-to-video** workflows. It is designed for teams that need short, cinematic, social-ready, or product-focused AI video assets without building the underlying generation infrastructure.
Sora2 is available through an async video generation endpoint, making it suitable for production workflows where jobs may take time to render and results are retrieved after processing.
Core capabilities
With `sora2`, you can generate one video per request using:
- **Text to video**: create a video from a written prompt.
- **Reference image to video**: use one uploaded or hosted image as visual guidance.
- **Async generation**: submit a job and poll or manage status in your application.
- **Short-form durations**: 4, 8, 12, 16, or 20 seconds.
- **Aspect ratios**: 16:9 for landscape video or 9:16 for vertical video.
- **Resolution**: 720p output is supported in the exposed request interface.
Best use cases
The Sora2 API is useful when your product or content workflow needs consistent short video generation:
1. Product reveal videos
E-commerce teams can use a product image as the reference and prompt Sora2 to create studio-style motion, soft lighting, camera movement, or lifestyle context.
Example use cases:
- Product launch clips
- Marketplace listing videos
- App preview visuals
- Feature highlight animations
2. Short-form social content
For TikTok, Reels, Shorts, and paid social, Sora2 can generate vertical 9:16 clips from a prompt. Teams can automate multiple concepts, review results, and publish selected assets.
3. Advertising creative testing
Growth teams can rapidly generate concept videos for hooks, backgrounds, product scenarios, and campaign variations. This is especially useful before committing budget to full production.
4. Storyboards and cinematic previews
Creative teams can turn scene descriptions into draft video shots for pitches, previsualization, or mood exploration.
5. Automated video workflows
Developers can integrate Sora2 into internal tools, content platforms, or customer-facing apps that need video generation as part of a larger pipeline.
API usage overview
Endpoint:
```http POST /v1/videos/generations ```
The API is asynchronous. Send a generation request with the model id `sora2`, the generation mode, prompt, and required video settings.
Text-to-video example
```json { "model": "sora2", "generation_mode": "text_to_video", "prompt": "A cinematic aerial shot of a futuristic city at sunset, smooth camera motion, warm light.", "duration": 4, "aspect_ratio": "16:9", "resolution": "720p", "video_count": 1 } ```
Reference image-to-video example
```json { "model": "sora2", "generation_mode": "reference_image_to_video", "prompt": "A cinematic product reveal, soft studio lighting, smooth camera movement.", "image_url": "https://example.com/reference.png", "duration": 4, "aspect_ratio": "16:9", "resolution": "720p", "video_count": 1 } ```
Required and optional parameters
Required video settings include:
- `prompt`: the text instruction for the video.
- `duration`: 4, 8, 12, 16, or 20 seconds.
- `resolution`: currently exposed as `720p` in the request interface.
- `aspect_ratio`: `16:9` or `9:16`.
For reference image generation, include:
- `image_url`: one PNG, JPEG, or WebP reference image.
The model currently generates **one video per generation request**.
Pricing angle
Sora2 is billed by video duration. On UniAll AI, the listed user price is **$0.068 per second** for the exposed Sora2 pricing profile. That means a 4-second generation is estimated from the per-second rate, while longer clips cost more because they use more billable seconds.
Pricing may vary by account context, API plan, region, or future model configuration. For production budgeting, calculate cost as:
```text estimated cost = duration in seconds × per-second unit price ```
Failed generations are configured for refund-on-failure, while automatic retry is not enabled by default.
Who should use Sora2 API?
Sora2 is a good fit for:
- Developers adding AI video generation to apps.
- Marketing teams producing ad concepts and short videos.
- E-commerce teams creating product motion assets.
- Agencies building scalable creative workflows.
- Platforms that need text-to-video or image-to-video generation through an API.
It is less suitable when you need long-form video, multi-video batches in one request, source video editing, or audio-driven generation, because those capabilities are not exposed in the current Sora2 API configuration.
常见问题
What is the public model id for the Sora2 API?
The public model id is `sora2`. Use this value in the `model` field when calling the UniAll AI video generation endpoint.
Does Sora2 support both text-to-video and image-to-video?
Yes. Sora2 supports `text_to_video` with a prompt and `reference_image_to_video` with a prompt plus one reference image URL.
How is Sora2 priced on UniAll AI?
Sora2 is billed per second of generated video. The listed user price is $0.068 per second, so total estimated cost depends on the selected duration.