Task endpoints
The general video task endpoint is:Text-to-video
Image-to-video
Polling
Poll every few seconds while the task is queued or running. Stop only at a terminal state such assucceeded or failed.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create video tasks, poll their status, and download completed video files.
POST /v1/video/generations
POST /v1/videos
curl https://kaienapi.com/v1/video/generations \\
-H "Authorization: Bearer <YOUR_API_KEY>" \\
-H "Content-Type: application/json" \\
-d '{
"model": "kling-v2-master",
"prompt": "A five-second product video with a slow camera push and a clean background",
"duration": 5,
"size": "1280x720"
}'
curl https://kaienapi.com/v1/videos/generations \\
-H "Authorization: Bearer <YOUR_API_KEY>" \\
-H "Content-Type: application/json" \\
-d '{
"model": "veo-3.1",
"prompt": "Animate the scene with a gentle forward camera movement",
"image": "https://oss.example.com/first-frame.jpg"
}'
succeeded or failed.
curl "https://kaienapi.com/v1/video/generations/<TASK_ID>" \\
-H "Authorization: Bearer <YOUR_API_KEY>"