> ## 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.

# Error Handling (Custom API - Deprecated)

> VEO API error handling, limitation explanations, and common issue resolution - Legacy documentation

**⚠️ This documentation is for legacy custom API, not recommended**Please see new version: [Veo-3.1 Troubleshooting](/en/api-capabilities/veo/veo-31-troubleshooting)

## API Limitations

Understanding API limitations helps better plan your application

### API Limits

| Limitation            | Value            | Description                                              |
| --------------------- | ---------------- | -------------------------------------------------------- |
| Prompt length         | 2000 characters  | Recommend keeping under 1000 characters for best results |
| Reference image count | Max 5 images     | Each image under 10MB                                    |
| Concurrent tasks      | 10 tasks         | Exceeding will return 429 error                          |
| Task timeout          | 30 minutes       | Timeout tasks will be automatically cancelled            |
| Video duration        | 10-15 seconds    | Varies by model                                          |
| Request frequency     | 100 requests/min | Exceeding limit will be rate-limited                     |

### Image Format Requirements

* Supported Formats

* Image Specifications

* **JPEG** (.jpg, .jpeg)

* **PNG** (.png)

* **WebP** (.webp)

* **File size:** Max 10MB per image

* **Recommended resolution:** 1024x1024 or higher

* **Color mode:** RGB

* **URL requirement:** Must be publicly accessible HTTPS link

## HTTP Error Codes

### 4xx Client Errors

### 5xx Server Errors

## API Error Codes

### Common Error Code List

| Error Code             | Description          | Solution                        |
| ---------------------- | -------------------- | ------------------------------- |
| `INVALID_PROMPT`       | Invalid prompt       | Check prompt length and content |
| `INVALID_MODEL`        | Model does not exist | Use supported model names       |
| `QUOTA_EXCEEDED`       | Quota exceeded       | Contact to increase quota       |
| `TASK_NOT_FOUND`       | Task does not exist  | Check task ID                   |
| `INVALID_IMAGE_URL`    | Invalid image URL    | Ensure image is accessible      |
| `IMAGE_TOO_LARGE`      | Image too large      | Compress image to under 10MB    |
| `TASK_TIMEOUT`         | Task timeout         | Resubmit task                   |
| `INSUFFICIENT_BALANCE` | Insufficient balance | Top up account                  |

### Error Response Format

```
{
  "success": false,
  "message": "Error description",
  "error_code": "ERROR_CODE",
  "details": {
    "field": "Specific error field",
    "reason": "Error reason",
    "suggestion": "Solution suggestion"
  }
}
```

## Troubleshooting Guide

### Task Stuck in processing Status

1

Check Task Duration

Confirm if exceeds normal processing time (see model documentation)

2

Verify Task ID

Ensure using correct task ID for query

3

Check API Status

Visit status page or contact support to confirm service status

4

Retry Submission

If exceeds 30 minutes, task may have timed out, please resubmit

### Poor Generation Quality

* Optimize Prompt
* Use Reference Images
* Enable Enhancement
* Choose Appropriate Model

```
# Before optimization
prompt = "cat"

# After optimization
prompt = """
An orange British Shorthair cat in a sunny living room,
lazily lying on a soft sofa,
afternoon sunlight streaming through the window onto it,
4K quality, warm tones
"""
```

```
# Add high-quality reference images
images = [
    "https://example.com/cat-reference-1.jpg",
    "https://example.com/cat-reference-2.jpg"
]
```

```
# Enable prompt enhancement
enhance_prompt = True
```

```
# For high-quality requirements, choose Pro version
model = "veo3-pro"
```

### Network Error Handling

```
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry

def create_session():
    session = requests.Session()
    retry = Retry(
        total=3,
        read=3,
        connect=3,
        backoff_factor=0.3,
        status_forcelist=(500, 502, 504)
    )
    adapter = HTTPAdapter(max_retries=retry)
    session.mount('http://', adapter)
    session.mount('https://', adapter)
    return session

# Use session with retry
session = create_session()
response = session.post(url, json=data, headers=headers)
```

## Common Questions FAQ

## Technical Support

## Encountering Issues?

If you encounter issues not covered in the documentation, please contact us via:

* **Email:** [threezhang.cn@gmail.com](mailto:threezhang.cn@gmail.com)
* **WeChat:** Kikivivikids
* **Telegram:** [https://t.me/laozhang\_cn](https://t.me/laozhang_cn)
* **Response time:** Within 24 hours on business days

When contacting, please provide:

* Task ID
* Error message
* Request parameters (hide sensitive information)
* Problem description

## Status Monitoring

Recommend implementing the following monitoring measures to promptly detect and handle issues:

```
class VEOMonitor:
    def __init__(self):
        self.success_count = 0
        self.failure_count = 0
        self.total_duration = 0
        
    def record_success(self, duration):
        self.success_count += 1
        self.total_duration += duration
        
    def record_failure(self, error_code):
        self.failure_count += 1
        # Record error type for analysis
        
    def get_success_rate(self):
        total = self.success_count + self.failure_count
        return self.success_count / total if total > 0 else 0
        
    def get_average_duration(self):
        return self.total_duration / self.success_count if self.success_count > 0 else 0
```
