Skip to main content
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "veo3.1-fast",
    "prompt": "Dolphins jumping in the blue ocean",
    "duration": 8,
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/start-frame.jpg", "https://example.com/end-frame.jpg"],
    "metadata": {
      "generation_type": "frame",
      "resolution": "1080p",
      "enable_gif": false
    }
  }'
{
  "id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
  "object": "generation.task",
  "model": "veo3.1-fast",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {
    "aspect_ratio": "16:9"
  }
}
  • Asynchronous processing mode, returns task ID for subsequent queries
  • Supports multiple generation modes including text-to-video and image-to-video
  • Generated video links are valid for 24 hours, please save them promptly
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in image_urls. Please use the Upload Image API first to upload images and get URLs, then call this endpoint.

Authorizations

Authorization
string
required
All endpoints require Bearer Token authenticationGet your API Key from the API Key Management PageAdd to request header:
Authorization: Bearer YOUR_API_KEY

Body

model
string
default:"veo3.1-fast"
required
Video generation model nameAvailable models:
  • veo3.1-fast - Fast generation model, suitable for quick preview and iteration
  • veo3.1-quality - High-quality generation model, suitable for final production
Example: "veo3.1-fast"
prompt
string
required
Text description for video generation
duration
integer
Video duration (seconds)Fixed value: 8 (VEO3 only supports 8-second duration)
aspect_ratio
string
Video resolutionSupported formats:
  • 16:9 (landscape)
  • 9:16 (portrait)
image_urls
string[]
Array of reference image URLs for image-to-video generation⚠️ URL format only (base64 no longer supported)
  • Publicly accessible image URL (http:// or https://)
  • You can use the Upload Image API to upload local images and get URLs
Limits:
  • Maximum file size: 10MB
  • Supported formats: .jpeg, .jpg, .png, .webp
metadata
object
VEO3-specific extended parameters

Response

id
string
Unique task identifier for status queries
object
string
Object type, always generation.task
model
string
Model name used
status
string
Task status
  • queued - Queued for processing
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
progress
integer
Task progress percentage (0-100)
created_at
integer
Task creation timestamp (Unix timestamp)
metadata
object
Task metadata
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "veo3.1-fast",
    "prompt": "Dolphins jumping in the blue ocean",
    "duration": 8,
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/start-frame.jpg", "https://example.com/end-frame.jpg"],
    "metadata": {
      "generation_type": "frame",
      "resolution": "1080p",
      "enable_gif": false
    }
  }'
{
  "id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
  "object": "generation.task",
  "model": "veo3.1-fast",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {
    "aspect_ratio": "16:9"
  }
}