API Reference
Complete API documentation for Veo 3.1 AI video generation
Overview
The Veo 3.1 API allows you to programmatically generate AI videos from text descriptions or images. Our RESTful API is designed to be simple, powerful, and easy to integrate into your applications.
Base URL
https://veo3o1.com/apiAuthentication
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYYou can generate API keys from your account dashboard.
Generate Video
Create a new AI video from text or image.
Endpoint
POST /generate-videoRequest Body
{
"generationType": "text_to_video" | "image_to_video",
"prompt": "Your video description",
"aspectRatio": "auto" | "16:9" | "9:16",
"imageUrl": "https://...", // Required if generationType is "image_to_video"
"imageKey": "r2-key" // Optional, for uploaded images
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
generationType | string | Yes | Type of generation: text_to_video or image_to_video |
prompt | string | Yes | Description of the video you want to generate |
aspectRatio | string | No | Video aspect ratio. Default: auto |
imageUrl | string | Conditional | Required if generationType is image_to_video |
imageKey | string | No | Storage key for uploaded images |
Response
{
"code": 0,
"msg": "Success",
"data": {
"uuid": "video-uuid-123",
"status": "pending",
"generationType": "text_to_video",
"prompt": "Your video description",
"aspectRatio": "16:9",
"createdAt": "2025-10-16T10:00:00Z"
}
}Example
curl -X POST https://veo3o1.com/api/generate-video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"generationType": "text_to_video",
"prompt": "A beautiful sunset over the ocean with waves gently lapping the shore",
"aspectRatio": "16:9"
}'Get Video Status
Check the status of a video generation request.
Endpoint
GET /video-status/{uuid}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | Yes | Video UUID from generation request |
Response
{
"code": 0,
"msg": "Success",
"data": {
"uuid": "video-uuid-123",
"status": "completed" | "pending" | "processing" | "failed",
"videoUrl": "https://...", // Available when status is "completed"
"progress": 85, // Processing progress (0-100)
"estimatedTime": 120 // Estimated seconds remaining
}
}Status Values
pending: Video is queued for processingprocessing: Video is being generatedcompleted: Video is ready and available for downloadfailed: Generation failed (check error message)
Upload Image
Upload an image for image-to-video generation.
Endpoint
POST /upload-video-imageRequest
Use multipart/form-data to upload image file.
curl -X POST https://veo3o1.com/api/upload-video-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/image.jpg"Response
{
"code": 0,
"msg": "Upload successful",
"data": {
"imageUrl": "https://...",
"imageKey": "r2-key-123"
}
}Supported Formats
- JPEG/JPG
- PNG
- WebP
- Maximum file size: 50MB
Error Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1000 | Invalid parameters |
| 1001 | Insufficient credits |
| 1002 | Authentication failed |
| 1003 | Rate limit exceeded |
| 5000 | Server error |
Error Response Example
{
"code": 1001,
"msg": "Insufficient credits",
"data": {
"required": 2,
"current": 0
}
}Best Practices
- Poll responsibly: Check video status every 5-10 seconds, not continuously
- Handle errors: Implement retry logic with exponential backoff
- Cache results: Store generated videos to avoid regenerating
- Use webhooks: More efficient than polling for completion
- Validate inputs: Check prompt length and image formats before API calls
Support
Need help with the API?
- 📧 Email: aiprocessingrobot@gmail.com
- 💬 Contact Support