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": "viduq3-pro",
    "prompt": "A cat playing piano, camera slowly zooms in",
    "duration": 8,
    "resolution": "1080p",
    "aspect_ratio": "16:9"
  }'
{
  "id": "video_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ",
  "object": "generation.task",
  "model": "viduq3-pro",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {}
}
  • Async processing mode, returns task ID for subsequent queries
  • Supports text-to-video, image-to-video, first-last frame video generation
  • Supports 540p / 720p / 1080p resolution
  • Duration range 1-16 seconds, audio enabled by default

Authorization

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

Request Parameters

model
string
required
Video generation model name, fixed as viduq3-pro
prompt
string
required
Text prompt, maximum 2000 charactersRequired for text-to-video. Optional for image-to-video and first-last frame modes.Example: "A cat playing piano, camera slowly zooms in"
duration
integer
default:"5"
Video duration (seconds)Range: 1 to 16Default: 5
resolution
string
default:"720p"
Video resolutionOptions:
  • 540p - Standard definition
  • 720p - HD (default)
  • 1080p - Full HD
Default: 720p
aspect_ratio
string
Video aspect ratio (only for text-to-video mode)Options:
  • 16:9 - Landscape
  • 9:16 - Portrait
  • 4:3 - Traditional
  • 3:4 - Portrait traditional
  • 1:1 - Square
This parameter is only available in text-to-video mode (when image_urls is not provided). In image-to-video mode, the aspect ratio is automatically determined by the image.
image_urls
string[]
Image URL array for image-to-video generationThe system automatically determines the generation mode based on the number of images:
  • 0 images (not provided): Text-to-video mode
  • 1 image: Image-to-video mode (image used as starting frame)
  • 2 images: First-last frame mode (first image = first frame, second image = last frame)
Example: ["https://example.com/photo.jpg"]
  • Maximum 2 images supported
  • For first-last frame mode, exactly 2 images must be provided
  • When image_urls is provided, the aspect_ratio parameter cannot be used
audio
boolean
default:"true"
Whether to generate audio (dialogue, sound effects)Default: trueSet to false for a silent video.
seed
integer
Random seed for reproducible resultsUsing the same seed with identical parameters will produce the same video output.

Auto Routing

The system automatically determines the generation mode based on the number of images in image_urls:
Images CountModeDescription
0 (not provided)Text-to-VideoGenerate from text description only
1Image-to-VideoUse the image as starting frame
2First-Last FrameFirst image = first frame, second image = last frame

Parameter Support Matrix

ParameterText-to-VideoImage-to-VideoFirst-Last Frame
model✅ Required✅ Required✅ Required
prompt✅ RequiredOptionalOptional
image_urls-✅ 1 image✅ 2 images
duration✅ 1-16s✅ 1-16s✅ 1-16s
resolution
aspect_ratio--
audio
seed

Response

id
string
Unique task identifier for querying task status
object
string
Object type, fixed as generation.task
model
string
Model name used for generation
status
string
Task status
  • queued - Waiting to be processed
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
progress
integer
Task progress percentage (0-100)
created_at
integer
Task creation Unix timestamp

Use Cases

Case 1: Text-to-Video

{
  "model": "viduq3-pro",
  "prompt": "A cat playing piano, camera slowly zooms in",
  "duration": 8,
  "resolution": "1080p",
  "aspect_ratio": "16:9"
}

Case 2: Image-to-Video (Single Image)

{
  "model": "viduq3-pro",
  "prompt": "The person slowly turns and smiles",
  "image_urls": ["https://example.com/photo.jpg"],
  "duration": 5,
  "resolution": "720p"
}

Case 3: First-Last Frame Video

{
  "model": "viduq3-pro",
  "prompt": "The person gradually sits down from standing",
  "image_urls": [
    "https://example.com/first.jpg",
    "https://example.com/last.jpg"
  ],
  "duration": 8
}

Case 4: Silent Video (Audio Disabled)

{
  "model": "viduq3-pro",
  "prompt": "Sunset seascape timelapse photography",
  "duration": 10,
  "resolution": "1080p",
  "audio": false
}
Query Task ResultsVideo generation is an async task that returns a task ID upon submission. Use the Get Task Status endpoint to query generation progress and results.
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "viduq3-pro",
    "prompt": "A cat playing piano, camera slowly zooms in",
    "duration": 8,
    "resolution": "1080p",
    "aspect_ratio": "16:9"
  }'
{
  "id": "video_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ",
  "object": "generation.task",
  "model": "viduq3-pro",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {}
}