Copyable code samples
Every sample uses real, live model ids and the documented request shape. Set KINOVI_API_KEY in your environment first. None of these call a Seedance 3.0 model, because none exists.
Create and poll
Submit a 5-second, 720p Seedance 2.5 Flash job, poll every 5 seconds, and print the file URL. The fixed interval keeps the sample short; production code should stretch the gap and use your own timeout.
# 1. Submit
curl -s -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $KINOVI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance2-5-flash",
"inputs": {
"prompt": "Handheld tracking shot along a night canal, paper lanterns swaying. Sound: bicycle bell and water, no music.",
"duration": 5,
"outputResolution": "720p",
"aspectRatio": "16:9"
}
}'
# => {"taskId":"..."}
# 2. Poll every few seconds until status is success or fail
curl -s "https://kinovi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $KINOVI_API_KEY"
# => {"status":"success","output":[{"url":"https://..."}], ...}Typed client and async Python
A small TypeScript client with the documented record type, and an async Python loop with a growing poll interval. Both read the model id from SEEDANCE_MODEL so switching models is a config change.
type Status = "waiting" | "generating" | "success" | "fail";
interface Task {
taskId: string;
model: string;
status: Status;
creditsUsed: number;
output: { url: string; width: number; height: number; mediaType: string; seed?: number }[] | null;
error: { code: string; message: string } | null;
createTime: number;
completeTime: number | null;
}
const BASE = "https://kinovi.ai/api/v1";
const MODEL = process.env.SEEDANCE_MODEL ?? "seedance2-5"; // keep the id in config
const headers = {
Authorization: `Bearer ${process.env.KINOVI_API_KEY}`,
"Content-Type": "application/json",
};
export async function createTask(inputs: Record<string, unknown>, callBackUrl?: string): Promise<string> {
const res = await fetch(`${BASE}/jobs/createTask`, {
method: "POST",
headers,
body: JSON.stringify({ model: MODEL, inputs, ...(callBackUrl ? { callBackUrl } : {}) }),
});
const body = await res.json();
if (!res.ok) throw new Error(`createTask ${res.status}: ${body.message}`);
return body.taskId;
}
export async function getTask(taskId: string): Promise<Task> {
const res = await fetch(`${BASE}/jobs/recordInfo?taskId=${encodeURIComponent(taskId)}`, { headers });
if (!res.ok) throw new Error(`recordInfo ${res.status}`);
return res.json();
}Request variants
Only the createTask body changes between these. Poll each returned taskId exactly as above. Replace the example URLs with files that are publicly reachable — a URL only your machine can see fails the task with asset_review_failed.
curl -s -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $KINOVI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance2-5",
"inputs": {
"prompt": "The camera slowly pushes in as steam rises from the cup.",
"imageUrls": ["https://your-cdn.example/first-frame.png"],
"mode": "keyframe",
"duration": 5,
"outputResolution": "720p"
}
}'- Image → video: one image in
keyframemode becomes the opening frame. Two images set the opening and closing frames. - Character reference:
mode: "reference"uses the images as subject references instead of frames. Reuse the same images for every clip of a recurring character. - Extend:
durationis the length of the new footage; billing counts source plus new seconds at the reference rate. - Edit: no
duration; the output matches the source. Billing settles at 2 × source seconds at the reference rate. - Draft → 4K: render a cheap 480p preview, then upgrade only the one you keep, within 7 days.
Sources, read 2026-12-01: [Kinovi Docs — Seedance 2.5 — kinovi.ai/docs/models/seedance2-5] · [Kinovi Docs — Seedance 2.5 Video Extend — kinovi.ai/docs/models/seedance2-5-extend] · [Kinovi Docs — Seedance 2.5 Video Edit — kinovi.ai/docs/models/seedance2-5-edit] · [Kinovi Docs — API Reference — kinovi.ai/docs/api]
Before you copy into production
- Store the taskId as soon as createTask returns.
- Handle 429 by waiting for one of your own tasks to finish, not by sleeping a fixed time.
- Copy
output[0].urlto your own storage; don't treat it as a permanent CDN. - Never ship the API key to a browser or mobile client.