Errors and limits
Errors
Section titled “Errors”Every error is a problem document (RFC 9457), Content-Type: application/problem+json:
{ "type": "https://kinoforge.dev/errors/insufficient-credits", "title": "Insufficient credits", "status": 402, "detail": "a human-readable reason", "code": "insufficient_credits", "correlation_id": "4f1c2a9e0b7d"}- Every error carries
correlation_id, also in theX-Correlation-Idheader. Send your ownX-Correlation-Id(8 to 64 letters, digits,-or_) to trace a run across calls. - A refused spend carries
estimate. - Every
422lists the bad fields inerrors: [{"field", "message"}]. Every body refuses fields it does not know. - A failed step’s
errorsays what failed and what you can do.
| Code | Status | Meaning |
|---|---|---|
invalid_request |
400 (405 for a wrong method) | The request is malformed |
validation_failed |
422 | A field is wrong; see errors |
unauthorized |
401 | Missing or bad key |
insufficient_scope |
403 | A read key tried a write |
forbidden |
403 | Not yours |
not_available |
403 | Your account cannot use this |
not_found |
404 | No such thing |
conflict |
409 | Something is already running |
not_ready |
409 | Do an earlier step first |
confirm_required |
409 | A paid run needs "confirm": true; see estimate |
insufficient_credits |
402 | Balance too low |
spend_limit_exceeded |
402 | Over your max_credits |
payload_too_large |
413 | Body or file too big |
rate_limited |
429 | Too fast; see Retry-After |
quota_exceeded |
429 | Daily request quota used up |
job_limit_reached |
429 | Waited too long for a job slot |
daily_limit_reached |
429 | Daily cap on new videos or clip runs |
upstream_unavailable |
502, 503 | Retry with backoff |
service_unavailable |
503 | Retry later |
internal_error |
500 | Our bug; send the correlation id |
Limits
Section titled “Limits”- Per key: a rate limit (
429withRetry-After) and a daily request quota, independent of credits. - Per account per day: caps on new videos (stories and episodes) and clip runs.
- Jobs at once: each running step counts, and a project’s voiceover lane is a job of its own. A step over the cap waits (its stage stays
queued); one still waiting after about 2 hours fails withjob_limit_reached. - One step at a time per project (the voiceover lane aside): a second while one runs returns
409.
