Endpoints
Method Endpoint Description POST /api/v1/generateTask/vidu-q3Create a generation task GET /api/v1/statusTask/vidu-q3Запрос статуса задачи
Authentication
All requests must include your API key in the request headers:
Authorization : Bearer YOUR_API_KEY
Request Body
{
"request_type" : "async" ,
"callback_url" : "https://..." ,
"provider" : "auto" ,
"input" : {
"mode" : "text-to-video" ,
"prompt" : "a cinematic shot of a futuristic city at sunrise" ,
"resolution" : "720p" ,
"duration" : 8 ,
"style" : "general" ,
"aspect_ratio" : "4:3" ,
"movement" : "auto" ,
"sound" : true ,
"bgm" : true ,
"seed" : 1234
}
}
Parameters
request_type
string
по умолчанию: "async"
Execution mode: async (polling) or callback
Callback URL. Required when request_type=callback. (conditional)
provider
string
по умолчанию: "auto"
Routing strategy: auto, value, official, or a specific provider channel
Параметры входа модели text-to-video / image-to-video / turbo-text-to-video / turbo-image-to-video (image modes support 1 or 2 images via image_urls)
Text prompt, 1-5000 characters
Output resolution: 540p, 720p, or 1080p
Video duration in seconds, from 1 to 16. Billing is charged per second.
Style preset for text modes only: general or anime
Aspect ratio for text modes only: 16:9, 9:16, 4:3, 3:4, or 1:1
Reference image URLs. Required for image modes. Up to 2 images are supported: 1 image for single-image animation, 2 images for first-and-last-frame generation. (conditional)
Motion strength: auto, small, medium, or large
sound
boolean
по умолчанию: "true"
Whether to generate sound effects (maps to the upstream generate_audio capability)
bgm
boolean
по умолчанию: "true"
Whether to generate background music
Random seed, from -1 to 2147483647
Mode Reference:
text-to-video - Generate a video from text only
image-to-video - Generate a video from 1 or 2 images
turbo-text-to-video - Turbo text-to-video mode
turbo-image-to-video - Turbo image-to-video mode with 1 or 2 images
Examples
Text-to-video (text-to-video)
curl -X POST "https://api.apixo.ai/api/v1/generateTask/vidu-q3" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_type": "async",
"input": {
"mode": "text-to-video",
"prompt": "a cinematic flyover of a futuristic city at sunrise",
"resolution": "720p",
"duration": 8,
"style": "general",
"aspect_ratio": "16:9",
"movement": "auto",
"sound": true,
"bgm": true
}
}'
Single-image animation (image-to-video, 1 image)
curl -X POST "https://api.apixo.ai/api/v1/generateTask/vidu-q3" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_type": "callback",
"callback_url": "https://your-server.com/callback",
"input": {
"mode": "image-to-video",
"prompt": "make this image come alive with subtle motion",
"resolution": "1080p",
"duration": 4,
"image_urls": [
"https://example.com/start.jpg"
]
}
}'
First-and-last-frame generation (image-to-video, 2 images)
curl -X POST "https://api.apixo.ai/api/v1/generateTask/vidu-q3" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_type": "async",
"input": {
"mode": "image-to-video",
"prompt": "transition from start to end smoothly",
"resolution": "720p",
"duration": 8,
"image_urls": [
"https://example.com/start.jpg",
"https://example.com/end.jpg"
]
}
}'
Response
POST /api/v1/generateTask/vidu-q3
При успехе API возвращает taskId для последующего запроса статуса задачи.
Успех:
{
"code" : 200 ,
"message" : "success" ,
"data" : {
"taskId" : "task_12345678"
}
}
Ошибка:
{
"code" : 400 ,
"message" : "Insufficient credits" ,
"data" : null
}
GET /api/v1/statusTask/vidu-q3
Используйте taskId для запроса статуса выполнения и итогового результата.
curl -X GET "https://api.apixo.ai/api/v1/statusTask/vidu-q3?taskId=task_12345678" \
-H "Authorization: Bearer YOUR_API_KEY"
Успех:
{
"code" : 200 ,
"message" : "success" ,
"data" : {
"taskId" : "task_12345678" ,
"state" : "success" ,
"resultJson" : "{ \" resultUrls \" :[ \" https://r2.apixo.ai/video.mp4 \" ]}" ,
"createTime" : 1767965610929 ,
"completeTime" : 1767965730929 ,
"costTime" : 120000
}
}
Ошибка:
{
"code" : 200 ,
"message" : "success" ,
"data" : {
"taskId" : "task_12345678" ,
"state" : "failed" ,
"failCode" : "CONTENT_VIOLATION" ,
"failMsg" : "Content does not meet safety guidelines"
}
}
Status Response Fields
Уникальный идентификатор задачи.
Текущее состояние задачи: pending, processing, success или failed.
JSON-строка с массивом resultUrls. Присутствует только при success. Парсите через JSON.parse().
Код ошибки. Присутствует только при state=failed. См. Error Codes .
Читаемое сообщение об ошибке. Присутствует только при state=failed.
Timestamp создания задачи (Unix миллисекунды).
Timestamp завершения задачи (Unix миллисекунды).
Длительность обработки в миллисекундах.
Error Codes
Code Description 400 Invalid parameters or malformed request 401 Missing or invalid API key 402 Insufficient balance 429 Превышен лимит запросов
Fail Code Description CONTENT_VIOLATIONThe request violates safety guidelines INVALID_IMAGE_URLThe provided image URL could not be fetched
Rate Limits
Limit Value Request rate 60 requests per minute Concurrent tasks 10
If you exceed the limit, the API returns a 429 error. Retry later.
Video generation takes longer than images — use callback mode for production workloads. Result URLs expire after 15 days; download important outputs promptly.
Tips
Image count by mode : For image-to-video and turbo-image-to-video, the number of image_urls determines the workflow. 1 image creates a single-image animation. 2 images create a first-and-last-frame transition, where the first image is the start frame and the second image is the end frame.
Billing : Charges are calculated per second, and billed seconds are equal to duration. For pricing by resolution, see Pricing .
Polling recommendation : After submitting a task, wait about 60-90 seconds before polling, then poll every 5 seconds. For higher concurrency, prefer callback mode.
Result URL lifetime : Output URLs may expire. Download and store results as soon as possible.