Video Generation
POST
/v1/generationsGenerate videos using AI models. Video generation is asynchronous — you submit a request and poll for results.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | ✅ | Model name (e.g. kling/v2, wan/2.1) |
prompt | string | ✅ | Text description of the video |
duration | number | ❌ | Video duration in seconds |
image_url | string | ❌ | Reference image for image-to-video |
Async Flow
python
# 1. Submit generation request
response = client.post("/v1/generations", json={
"model": "kling/v2",
"prompt": "A cat playing piano",
"duration": 5
})
generation_id = response.json()["id"]
# 2. Poll for result
import time
while True:
result = client.get(f"/v1/generations/{generation_id}").json()
if result["status"] == "completed":
print(result["outputs"][0]["url"])
break
time.sleep(5)Available Models
| Model | Provider | Duration | Price |
|---|---|---|---|
kling/v2 | Kuaishou | 5–10s | $0.10–$0.30 |
wan/2.1 | Alibaba | 5s | $0.05 |
runway/gen3 | Runway | 4–16s | $0.25–$1.00 |

