Recipe 01 · Kinovi REST · docs read 2026-12-01
The job lifecycle, one status at a time
Seedance video generation is asynchronous. You never wait on an open HTTP request for a video — you get an ID back immediately and then watch a small record change state. Knowing exactly what each state means is the difference between a client that waits sensibly and one that gives up early or hammers the API.
Submit: what you get back
A job starts with POST https://kinovi.ai/api/v1/jobs/createTask and a body of { model, inputs, callBackUrl?, autoFix? }. If the request is valid and your balance covers the reservation, the response is 200 OK with nothing but { "taskId": "task_…" }. Kinovi's docs describe that moment as “the task is queued and its credits are reserved.”
A 200 from createTask therefore means accepted, not started and certainly not finished. Everything that follows happens on GET /api/v1/jobs/recordInfo?taskId=…, or in the single webhook call if you supplied callBackUrl.
The four statuses
| status | Documented meaning | What your client should do |
|---|---|---|
| waiting | Queued, not started yet. | Keep polling at a relaxed interval. Nothing is wrong yet. Do not resubmit — a second job is a second charge. |
| generating | Running on the provider. | Keep polling. This is usually the longest stretch. Show progress as elapsed time, not a percentage you don't have. |
| success | Done — read output[].url. | Stop polling. Download or copy the file to your own storage; save the seed if you care about it. |
| fail | Failed — see error.code / error.message; credits are refunded. | Stop polling. Decide from the error whether to change the input or retry as-is. |
Only success and fail are terminal. There is no documented “cancelled” or “expired” status, so a client that treats anything other than those two as “still in progress” is reading the API correctly. Write your loop so that an unknown status value is logged and treated as non-terminal rather than crashing — that keeps you safe if a status is ever added.
The transition from waiting to generating is not something you control. How long a job sits in waiting depends on load you can't see, which is why this site will not print a queue-time number. Your own account's concurrency cap also matters: Kinovi counts tasks that are waiting or generating against a per-account limit, and new accounts start at 3. A job beyond that cap is rejected with 429 at submit time rather than queued.
createTime and completeTime
Both are Unix epoch milliseconds. createTime is when the task was accepted. completeTime is when it reached a terminal status, and it stays null until then. That gives you two honest numbers without any extra instrumentation:
- Total turnaround =
completeTime − createTime, available once the job issuccessorfail. This includes queue time and generation time together. - Running so far =
now − createTimewhilecompleteTimeisnull. This is what your “still working” UI should show.
The record has no separate “started generating at” timestamp. If you want to split queue time from generation time, record the moment your own poller first sees generating. That observation is only as precise as your poll interval, so label it as an estimate.
function describe(task) {
const accepted = new Date(task.createTime);
if (task.completeTime == null) {
const runningFor = Date.now() - task.createTime;
return `${task.status} for ${Math.round(runningFor / 1000)} s since ${accepted.toISOString()}`;
}
const took = task.completeTime - task.createTime;
return `${task.status} after ${Math.round(took / 1000)} s (accepted ${accepted.toISOString()})`;
}Use the server's timestamps for turnaround, not your client clock. Your submit time includes network latency and your own retries; createTime doesn't.
Reading a finished record
This is the shape documented for a successful Seedance 2.5 job. For Seedance 2.5 the docs say output has exactly one item.
{
"taskId": "task_…",
"model": "seedance2-5",
"status": "success", // waiting | generating | success | fail
"creditsUsed": 295,
"output": [
{
"url": "https://…/seedance_video_….mp4",
"width": 1280,
"height": 720,
"mediaType": "video/mp4",
"seed": 53629,
"lastFrameImage": "https://…jpeg"
}
],
"error": null, // { code, message } when status is fail
"createTime": 1790090613532, // Unix epoch ms: task accepted
"completeTime": 1790090988835 // Unix epoch ms: terminal status, else null
}output[0].urlis the video file. Copy it to storage you control if you need it long-term.output[0].seedis the seed that was actually used. The docs note that re-using a seed does not reproduce a clip, so treat it as a record, not a replay button.output[0].lastFrameImageis a still of the final frame. The docs say it is valid for 7 days, and suggest passing it asimageUrls[0]of the next keyframe job to continue a shot.creditsUsedis the charge. With a reference video the docs say it is updated to the final amount shortly aftersuccess. Onfailit still shows the reserved amount even though the credits are back in your balance.
What happens to credits along the way
Credits are reserved when createTask returns and reconciled when the task finishes; failed tasks are refunded in full. That has a practical consequence for speed work: a job you abandon client-side is still running and still reserved. If you time out on your side, you have stopped watching, not stopped the job. Keep the taskId so you can check it later instead of submitting a duplicate.