> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yelinai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ

> Frequently asked questions about using Sora 2 API

## Video Generation Related

How to control portrait vs landscape video orientation?

**Control via model name**, not parameters.

* **Portrait:** `sora_video2`
* **Landscape:** `sora_video2-landscape`

Example:

```
# Portrait video
model = "sora_video2"

# Landscape video
model = "sora_video2-landscape"
```

See [Models and Pricing](/api-capabilities/sora2/models-pricing) page for details.

Do generated videos have watermarks?

\*\*No watermarks!\*\*Videos generated by Sora 2 API provided by our site are **watermark-free**, while videos generated on the official site still have Sora watermarks.

The original watermark-free solution became invalid after OpenAI’s upgrade, and has now been updated to a new watermark-free solution.

Why does generating character videos fail?

**Restriction reasons:**

1. **Real face reference images will be rejected** - Real person photo uploads not supported
2. **Only authorized real persons supported** - Use via `@ID` method

**Available authorized real persons:**

* `@sama` - OpenAI CEO Sam Altman

**Correct example:**

```
prompt = "@sama talking happily on the Great Wall"  # ✓ OK
```

**Incorrect example:**

```
# ✗ Not OK - Uploading real person photos will be rejected
# Uploaded a real person photo + prompt
```

What to do if generation time is too long?

**Normal generation time:**

* Queue: Depends on peak hours
* Generation: 2-3 minutes
* Total: 2.5-4 minutes

**Optimization suggestions:**

1. **Set reasonable timeout:** Recommend 5 minutes (300 seconds)

```
import httpx

client = openai.OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.yelinai.com/v1",
    http_client=httpx.Client(timeout=300.0)
)
```

2. **Use streaming output:** View progress in real-time

```
response = client.chat.completions.create(
    model="sora_video2",
    messages=[...],
    stream=True  # Enable streaming output
)
```

3. **Avoid peak hours:** Choose times with fewer users

Error: We're under heavy load, please try again later

**Reason:** OpenAI official load too high**Solutions:**

1. Wait a few minutes and retry
2. Add retry logic

```
import time

max_retries = 3
for i in range(max_retries):
    try:
        response = client.chat.completions.create(...)
        break
    except Exception as e:
        if "heavy load" in str(e) and i < max_retries - 1:
            print(f"Service busy, retrying in 30 seconds...")
            time.sleep(30)
        else:
            raise
```

## API Calling Related

What billing mode is required?

\*\*Required setting:\*\*Token needs to be set to **token-priority** or **per-call billing** mode.**Configuration steps:**

1. Log in to [YeLIn AI console](https://api.yelinai.com)
2. Enter API management
3. Edit token settings
4. Select “token-priority” or “per-call billing”

<Note>
  请在 **Console** 查看对应界面截图。
</Note>

If billing mode is not set correctly, calls will fail.

How to view generation progress?

**Use streaming output:**

```
stream = client.chat.completions.create(
    model="sora_video2",
    messages=[...],
    stream=True  # Enable streaming output
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end='', flush=True)
```

**Progress information example:**

```
> ⌛️ Task is in queue, please wait patiently...

> 🏃 Progress: 36.0%

> 🏃 Progress: 68.5%

> ✅ Video generated successfully, [click here](https://xxx.mp4) to view video~~~
```

How to handle timeout errors?

**Increase timeout:**

```
import httpx
import openai

# Set 5 minute timeout
client = openai.OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.yelinai.com/v1",
    http_client=httpx.Client(timeout=300.0)
)
```

**Recommended timeout:**

* Minimum: 5 minutes (300 seconds)
* Recommended: 10 minutes (600 seconds)

Which image formats are supported?

**Image-to-video supports:**

1. **URL images**

```
{
    "type": "image_url",
    "image_url": {
        "url": "https://example.com/image.png"
    }
}
```

2. **Base64 encoding**

```
{
    "type": "image_url",
    "image_url": {
        "url": "data:image/png;base64,iVBORw0KG..."
    }
}
```

**Supported formats:**

* PNG
* JPEG/JPG
* WebP
* GIF (first frame will be used)

**Limitations:**

* Maximum 1 image
* Recommended resolution not exceeding 2048×2048

## Video Download Related

How long is the video link valid?

**Validity: Only 1 day**

Videos are stored on domestic CDN, **storage validity is only 1 day**. Please **download immediately** after generation and save locally!

**Best practice:**

```
import requests

def download_video(url, save_path):
    """Download video to local"""
    response = requests.get(url, stream=True)
    with open(save_path, 'wb') as f:
        for chunk in response.iter_content(chunk_size=8192):
            f.write(chunk)
    print(f"Saved: {save_path}")

# Download immediately after generation
video_url = extract_video_url(result)
download_video(video_url, "my_video.mp4")
```

How to extract video link?

**Extract from response:**

```
import re

def extract_video_url(content):
    """Extract video link from response content"""
    match = re.search(r'https://[^\s\)]+\.mp4', content)
    return match.group(0) if match else None

# Usage example
response = client.chat.completions.create(...)
content = response.choices[0].message.content
video_url = extract_video_url(content)
```

**Link format example:**

```
https://sora.gptkey.asia/assets/sora/xxx.mp4
```

What to do if download speed is slow?

**Optimization suggestions:**

1. **Use domestic network** - Videos stored on domestic CDN, fast access from China
2. **Streaming download** - Avoid loading all into memory at once

```
import requests

response = requests.get(video_url, stream=True)
with open('video.mp4', 'wb') as f:
    for chunk in response.iter_content(chunk_size=8192):
        f.write(chunk)
```

3. **Resume support** - Use download tools that support resume

## Billing Related

How are charges calculated? Are failed attempts charged?

**Billing Method:** Pay-per-call**Sync API Billing Rules** (/v1/chat/completions):

* ✓ Charged when video **successfully generated**
* ⚠️ **Also charged for content violations** - Request succeeded (HTTP 200), resources consumed
* ✗ Network errors, timeouts **not charged**

**Async API Billing Rules** (/v1/videos) - Recommended:

* ✓ Only charged when status = “completed”
* ✗ **No charge for any failure**:
  * Content violation (status = “failed”) → Not charged
  * Queue timeout → Not charged
  * Generation failure → Not charged

**Pricing (10/20 Update):**

* 10s/15s videos (portrait/landscape): **\$0.15/call** (unified pricing)
* HD video (sora-2-pro): \$0.8/call ([Async API](/en/api-capabilities/sora2/async-api) only)

**Top-up Benefits:**

* Top-up \$100, approximately ¥1.0/call (base models)

**Major Price Drop!** 15s models reduced from 0.25to0.25 to 0.25to0.15/call, same as 10s models. Recommend choosing 15s version for better results!

**Recommend Async API for production**: No charge on failure, better cost control, higher stability. View [Async API docs](/en/api-capabilities/sora2/async-api)

\*\*About Content Violation Charges (Sync API only):\*\*If prompts or images violate OpenAI content policy, Sync API returns success (HTTP 200) with error message, **charges still apply**. Reasons:

* Request successfully submitted to OpenAI platform
* Platform resources consumed for content review
* Async API doesn’t charge (status = “failed”)

**Recommendations:**

1. Test prompts and images on [sora.chatgpt.com](https://sora.chatgpt.com) first
2. Batch generate via API after confirmation
3. Or use Async API (no charge on failure)
4. Avoid real person photos, copyrighted content

Official price comparison

**YeLIn AI vs OpenAI Official:**

| Item            | YeLIn AI        | OpenAI Official            |
| --------------- | --------------- | -------------------------- |
| Invitation code | Not required    | Required                   |
| Price           | \$0.15/call     | Expensive with rate limits |
| Watermark       | None            | Yes                        |
| Access          | Fast from China | Requires proxy             |
| Stability       | High            | -                          |

OpenAI official has launched `sora-2` and `sora-2-pro` models, but prices are high, with rate limits, and generated videos have watermarks.

How to get discounts through top-up?

**Top-up steps:**

1. Log in to [YeLIn AI console](https://api.yelinai.com)
2. Go to top-up page
3. Single top-up of \$100 or more

**Discounted pricing:**

* 10-second video: approximately ¥1.0/call

**Supported payment methods:**

* Alipay
* WeChat Pay

## Client Usage

How to configure Cherry Studio?

**Configuration steps:**

1. Add YeLIn AI API configuration in Cherry Studio
   * See: [Cherry Studio Configuration Documentation](/scenarios/chat/cherry-studio)
2. Enable video feature
   * Find `sora_video2` in model settings
   * Turn on video generation switch
3. Use
   * Text-to-video: Enter prompt directly
   * Image-to-video: Upload image + prompt

Which clients are supported?

**Tested and supported:**

* **Cherry Studio** ✓ - Full support, recommended
* **ChatBox** ✓ - Supported
* **OpenWebUI** ✓ - Supported
* **ChatGPT Next Web** ✓ - Supported

**Any client compatible with OpenAI API can be used**Configuration method:

* API endpoint: `https://api.yelinai.com/v1`
* Model: Select `sora_video2` series

## Technical Support

How to get technical support?

**Contact methods:**

1. **Email:** [threezhang.cn@gmail.com](mailto:threezhang.cn@gmail.com)
2. **WeChat:** Kikivivikids
3. **Telegram:** [https://t.me/laozhang\_cn](https://t.me/laozhang_cn)
4. **Documentation:** []()

**When submitting issues, please provide:**

* Error message screenshots
* Request parameters (hide API Key)
* Problem occurrence time
* Model name used

Where to view update logs?

**Update records:**

* **10/07** Added Python example code
* **10/01** Launched Sora 2 model, supports text-to-video and image-to-video

View complete updates: [Overview page](/api-capabilities/sora2/overview)

## Best Practice Recommendations

## Prompt Recommendations

* ✓ Describe specific scenes and actions
* ✓ Include details like lighting, atmosphere, emotions
* ✓ Use authorized real person IDs (e.g., `@sama`)
* ✗ Avoid describing real human faces
* ✗ Avoid overly brief descriptions

## Model Selection Recommendations

* Portrait video: `sora_video2` (mobile short videos, social media)
* Landscape video: `sora_video2-landscape` (widescreen display, computer playback)
* Both models have extremely high stability, choose with confidence

## Error Handling Recommendations

* Set reasonable timeout (recommend 5 minutes)
* Add retry logic (maximum 2-3 times)
* Use streaming output to monitor progress
* Record error logs

## Cost Optimization Recommendations

* Both models have extremely high stability, reducing retry costs
* Control concurrency when batch generating
* No charge for failures, retry with confidence
* Download videos promptly (storage validity 1 day)

## Related Links

## Quick Start

View example code and usage methods

## Model Pricing

Learn detailed model comparison and pricing

## Usage Examples

View application examples for various scenarios

## API Reference

View complete API documentation
