Skip to main content
This is legacy Sora2 route documentation and is now outdated. Use Sora Official API Forwarding for the currently available video route.

Complete Python Examples

Basic Text-to-Video

Streaming Output Example

Image-to-Video (URL)

Image-to-Video (Base64)

Automatic Video Download

JavaScript/Node.js Examples

Basic Text-to-Video

Streaming Output

Automatic Video Download

Cherry Studio Use Case

Cherry Studio is a powerful AI conversation client that supports Sora 2 video generation.

Configuration Steps

1

Configure API

Add laozhang.ai API configuration in Cherry StudioSee: Cherry Studio Configuration Documentation
2

Enable Video Feature

Find sora_video2 in model settings and enable video generation featureEnable video feature
3

Text-to-Video

Simply enter text description to generate video
4

Image-to-Video

Upload image + prompt to generate videoImage-to-video

Usage Examples

Text-to-Video

Directly enter in Cherry Studio dialogue box:
System will automatically:
  1. Display prompt optimization results
  2. Show generation progress (queue status, percentage)
  3. Provide video playback link

Image-to-Video

  1. Click upload image button and select reference image
  2. Enter prompt:

Batch Generation Examples

Python Batch Generation

Best Practices

  • Describe specific scenes and actions
  • Include details like lighting and atmosphere
  • Use authorized real person IDs like @sama
  • Avoid describing real human faces (will be rejected)
  • Set reasonable timeout (recommended 5 minutes)
  • Add retry logic
  • Record failure reasons
  • Use streaming output to monitor progress
  • Download immediately after generation (valid for 1 day)
  • Use streaming download for large files
  • Save to local or cloud storage
  • Make backups
  • Both models have extremely high stability
  • Control concurrency when batch generating
  • No charge for failures, retry with confidence
  • Download videos promptly (storage validity 1 day)

Next Steps

FAQ

View frequently asked questions

Model Pricing

Learn detailed model comparison

API Reference

View complete API documentation

Quick Start

Back to quick start guide