Errors
Errors use RFC 9457 application/problem+json:
{
"type": "https://klipperstudio.com/developers/errors#plan_not_found",
"title": "Not found",
"status": 404,
"code": "plan_not_found",
"detail": "No plan or credit pack with code 'gold'. List them with GET https://klipperstudio.com/api/v1/plans.",
"instance": "/api/v1/plans/gold"
}
Branch on code, never on detail text. MCP tools return the same detail as a tool result with isError: true.
Codes
| Status | Code | Meaning and fix |
|---|---|---|
| 400 | invalid_parameter | A query parameter has the wrong type; fields names it |
| 400 | invalid_cursor, invalid_limit | Pass next_cursor unchanged; limit is 1-50 |
| 400 | invalid_kind | kind is time_plan or credit_pack (plans) or page/developer (search) |
| 400 | invalid_minutes, invalid_account, invalid_remove_watermark | Check the estimate parameters |
| 400 | missing_query, missing_url | q (search) or url (moments) is required |
| 400 | invalid_idempotency_key | 8-128 characters of [A-Za-z0-9._:-] |
| 400 | invalid_json | The body is not JSON |
| 404 | not_found | No such endpoint; see the OpenAPI spec |
| 404 | plan_not_found, page_not_found, clip_plan_not_found | Unknown code, path or plan id (plans expire after 30 days) |
| 405 | method_not_allowed | Wrong HTTP method |
| 409 | idempotency_key_reused | Same key, different body: use a new key |
| 415 | unsupported_media_type | Send Content-Type: application/json |
| 422 | invalid_body, unknown_field, body_too_large | Body is not an object, has extra fields, or is over 16 KB |
| 422 | invalid_videos_per_month, invalid_minutes_per_video, invalid_horizon_days, invalid_platforms | Clip-plan field out of range |
| 422 | invalid_video_url | Not a YouTube video link |
| 422 | video_unreadable | The video is private, age-restricted or still live |
| 429 | rate_limited, tool_busy | Wait Retry-After seconds |
| 500 | internal_error | Retry with a delay; report it if it repeats |
| 502 | upstream_error | The moments service failed; retry later |
| 503 | upstream_unavailable | The moments service is unreachable; retry in a minute |
Unknown paths on the website return 404 with a Markdown body when you send Accept: text/markdown, listing where to go next (llms.txt, search, sitemap, docs).