Skip to main content
POST
https://toapis.com
/
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://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}
  • 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

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
array
Array of reference image URLs for image-to-video generation💡 Quick fill (Try it area):
  1. Click ”+ Add an item” to add an image URL
  2. Enter the complete image URL address or base64 data

Response

code
integer
Response status code
data
array
Response data array
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://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}