Skip to main content
Archived page: the Sora 2 video API has been retired. LaoZhang API stopped serving Sora 2 on July 1, 2026, and OpenAI removed the Videos API, sora-2, and sora-2-pro from its API on September 24, 2026. This page keeps the legacy route documentation for existing integrations, and its examples no longer work.For video generation, use Wan 2.7 or Seedance 2.0. To migrate, see Sora 2 API retired: move to Wan or Seedance.
This page covers the legacy route’s Sync API (/v1/chat/completions).

Prerequisites

1

Get API Key

Login to laozhang.ai console to get your API key
2

Configure Billing Mode

Edit token settings, choose either billing mode (both have same price):
  • Usage first (按量优先, recommended): Uses balance first, auto-switches when low. Suitable for most users
  • Per-call (按次计费): Direct charge per call. Suitable for strict budget control
Both modes had the same historical price of $0.15 per call (10 s or 15 s); only the billing method differed.Token settingsCalls failed if no billing mode was set, so this step had to be completed first.

Text-to-Video Example

About @sama in ExamplesYou may notice @sama used in examples. This is OpenAI CEO Sam Altman’s authorized ID, allowing his likeness to appear in videos.This is optional:
  • ✓ Can use @sama or other verified IDs
  • ✓ Can skip it and use normal scene descriptions (e.g., “a cat in a garden”)
  • ✗ Cannot upload real person photos (will be rejected and charged)
Want yourself in the video? Requires Cameo certification in Sora iOS app. See FAQ
The simplest usage method - generate videos using only text descriptions.

Image-to-Video Example

Supports uploading reference images (up to 1 image), supports both URL and Base64 methods.

Streaming Output Example

Enable streaming output to view generation progress in real-time.

Output Interpretation

Streaming Output Format

When "stream": true is enabled, API returns SSE (Server-Sent Events) format:

Key Field Descriptions

  • choices[0].delta.content: Contains progress information or final video link
  • finish_reason: When "stop", generation is complete
  • usage: Last message contains token usage
  • Video link: Provided as Markdown link in success message

Generation Time

  • Queue Wait: Depends on peak hours
  • Video Generation: About 2-3 minutes (for 10-second video)
  • Total: 2-5 minutes on average

Next Steps

Sora 2 API retired

Move to Wan 2.7 or Seedance 2.0

API Reference

View legacy API documentation

Code Examples

View more usage examples

FAQ

Common issues and solutions

Important Notes

Remember to download videos immediately!Generated video URLs are valid for only 1 day. Please download to local storage after generation to avoid losing videos.
Model selection:
  • sora_video2: Vertical screen (704×1280), suitable for mobile viewing
  • sora_video2-landscape: Horizontal screen (1280×704), suitable for widescreen displays