Try Without Signing Up
Use the demo API key to explore the API instantly. This key can only query existing sample tasks — it cannot create new videos.
export SEEDANCE_API_KEY="zimg_demo_readonly_d2cb4bea56fcc21a9eb106e0"
Sample task IDs you can query:
| Task ID | Status | Description |
|---|
demo_task_t2v_success | success | Completed text-to-video |
demo_task_i2v_success | success | Completed image-to-video |
demo_task_fail_text_moderation | fail | Prompt flagged by content moderation |
demo_task_fail_face_detected | fail | Face detected in uploaded image |
demo_task_fail_server_error | fail | Server error (safe to retry) |
Try it now:
curl -s "https://kinovi.ai/api/v1/jobs/recordInfo?taskId=demo_task_t2v_success" \
-H "Authorization: Bearer zimg_demo_readonly_d2cb4bea56fcc21a9eb106e0"
The demo key has 0 credits and cannot create tasks. To generate videos, sign up and get your own API key.
Full Demo Script
Copy the script below, paste your API key, and run it. The script will create a task, poll until completion, and print the video URL.
import requests, time, sys
API_KEY = "YOUR_API_KEY" # ← paste your API key here
BASE_URL = "https://kinovi.ai/api/v1"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# 1. Create task
print("Creating task...")
resp = requests.post(f"{BASE_URL}/jobs/createTask", headers=headers, json={
"model": "seedance-20",
"inputs": {
"prompt": "A golden retriever running on a beach at sunset, waves crashing in the background, cinematic slow motion",
"duration": "5",
"aspectRatio": "16:9"
}
})
data = resp.json()
if not resp.ok:
print(f"Error: {data['message']}")
if resp.status_code == 402:
print(f" Need {data['required']} credits, you have {data['available']}")
sys.exit(1)
task_id = data["taskId"]
print(f"Task created: {task_id}")
# 2. Poll for completion
print("Generating video", end="", flush=True)
start = time.time()
while time.time() - start < 300:
resp = requests.get(f"{BASE_URL}/jobs/recordInfo?taskId={task_id}", headers=headers)
result = resp.json()
if result["status"] == "success":
elapsed = int(time.time() - start)
print(f"\n\nDone in {elapsed}s!")
print(f"Video URL: {result['output'][0]['url']}")
print(f"Resolution: {result['output'][0]['width']}x{result['output'][0]['height']}")
sys.exit(0)
if result["status"] == "fail":
print(f"\n\nFailed: {result['error']['message']}")
sys.exit(1)
print(".", end="", flush=True)
time.sleep(5)
print("\n\nTimeout after 300s. Task may still be processing.")
print(f"Check manually: GET {BASE_URL}/jobs/recordInfo?taskId={task_id}")
pip install requests
python demo.py
const API_KEY = "YOUR_API_KEY"; // ← paste your API key here
const BASE_URL = "https://kinovi.ai/api/v1";
const headers = {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
async function main() {
// 1. Create task
console.log("Creating task...");
const createResp = await fetch(`${BASE_URL}/jobs/createTask`, {
method: "POST",
headers,
body: JSON.stringify({
model: "seedance-20",
inputs: {
prompt: "A golden retriever running on a beach at sunset, waves crashing in the background, cinematic slow motion",
duration: "5",
aspectRatio: "16:9",
},
}),
});
const createData = await createResp.json();
if (!createResp.ok) {
console.error(`Error: ${createData.message}`);
if (createResp.status === 402) {
console.error(` Need ${createData.required} credits, you have ${createData.available}`);
}
process.exit(1);
}
const { taskId } = createData;
console.log(`Task created: ${taskId}`);
// 2. Poll for completion
process.stdout.write("Generating video");
const start = Date.now();
while (Date.now() - start < 300000) {
const pollResp = await fetch(`${BASE_URL}/jobs/recordInfo?taskId=${taskId}`, { headers });
const data = await pollResp.json();
if (data.status === "success") {
const elapsed = Math.round((Date.now() - start) / 1000);
console.log(`\n\nDone in ${elapsed}s!`);
console.log(`Video URL: ${data.output[0].url}`);
console.log(`Resolution: ${data.output[0].width}x${data.output[0].height}`);
process.exit(0);
}
if (data.status === "fail") {
console.log(`\n\nFailed: ${data.error?.message}`);
process.exit(1);
}
process.stdout.write(".");
await new Promise((r) => setTimeout(r, 5000));
}
console.log("\n\nTimeout after 300s. Task may still be processing.");
console.log(`Check manually: GET ${BASE_URL}/jobs/recordInfo?taskId=${taskId}`);
}
main();
# Set your API key
export SEEDANCE_API_KEY="YOUR_API_KEY"
# 1. Create task
echo "Creating task..."
RESPONSE=$(curl -s -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $SEEDANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-20",
"inputs": {
"prompt": "A golden retriever running on a beach at sunset, waves crashing in the background, cinematic slow motion",
"duration": "5",
"aspectRatio": "16:9"
}
}')
echo "$RESPONSE" | python3 -m json.tool
# 2. Extract taskId and poll
TASK_ID=$(echo "$RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin)['taskId'])")
echo "Polling task: $TASK_ID"
while true; do
RESULT=$(curl -s "https://kinovi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SEEDANCE_API_KEY")
STATUS=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")
if [ "$STATUS" = "success" ]; then
echo "Done!"
echo "$RESULT" | python3 -m json.tool
break
elif [ "$STATUS" = "fail" ]; then
echo "Failed!"
echo "$RESULT" | python3 -m json.tool
break
fi
echo "Status: $STATUS ... waiting 5s"
sleep 5
done
What This Demo Does
| Step | API Call | Cost |
|---|
| Create task | POST /jobs/createTask | 200 credits (5s video) |
| Poll status | GET /jobs/recordInfo | Free |
| Download video | Direct URL | Free |
A 5-second 720P video costs 200 credits ($1.00). Generation typically finishes in 1-5 minutes.
Try Different Parameters
Replace aspectRatio value:
16:9 — Landscape (default)
9:16 — Portrait
1:1 — Square
4:3 — Landscape
3:4 — Portrait
21:9 — Ultra-wide
Replace duration value: "4" to "15" (seconds as string). Credits scale linearly (40 credits/sec for pro, 28 credits/sec for fast).
Add urls to inputs (1-2 images):{
"model": "seedance-20",
"inputs": {
"urls": [
"https://example.com/first-frame.jpg",
"https://example.com/last-frame.jpg"
],
"prompt": "Smooth transition between the two scenes",
"duration": "5",
"aspectRatio": "16:9"
}
}
Next Steps
Playground
Try video generation in the browser — no code needed
Text to Video
Full text-to-video documentation
Image to Video
First & last frame video generation
Omni Reference
Visual references with @N syntax