Skip to main content
POST
https://api.apimart.ai
/
v1
/
videos
/
generations
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "veo3.1-fast",
    "prompt": "Dolphins leaping in the azure 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"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "veo3.1-fast",
    "prompt": "Dolphins leaping in the azure 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"
    }
  ]
}

Authorizations

Authorization
string
required
All API endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the 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 previews and iterations
  • 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 in secondsFixed value: 8 (VEO3 only supports 8 seconds duration)
aspect_ratio
string
Video aspect_ratioSupported formats:
  • 16:9 (Landscape)
  • 9:16 (Portrait)
generation_type
string
Video generation typeSupported types:
  • frame - Frame-to-video (FL mode)
  • reference - Reference image-to-video
If not specified, defaults based on image count: 2 images for frame-to-video, 3 images for reference image-to-videoNote: veo3.1-quality model does not support reference mode
image_urls
array<url>
Array of reference image URLs for image-to-video generationSupports publicly accessible image URLs (http:// or https://)Example: ["https://example.com/image.jpg"]Limitations:
  • Maximum 3 images
  • For frame-to-video mode: first image is the start frame, second image is the end frame
  • Maximum file size: 10MB
  • Supported formats: .jpeg, .jpg, .png, .webp
resolution
string
Video resolutionSupported values:
  • 720p (Default)
  • 1080p
  • 4k
enable_gif
boolean
Enable GIF output format. Default: falseNote: GIF and 1080p/4k resolution cannot be used simultaneously

Response

code
integer
Response status code
data
array
Response data array