Skip to main content
Every error response is JSON with at least an error field, and often a message for humans:

Status codes

A render that fails during execution (bad Manim code, runtime error) still returns 200 from GET /api/v2/render/{jobId} — the failure surfaces as status: "failed" with error populated. HTTP 5xx is reserved for Kodisc-side problems, not your scene’s.

The credit model

Credits are the unit Kodisc bills against. Each render consumes credits proportional to its wall-clock render time and quality preset. The lifecycle of credits during a render:
1

Reserve

On POST /api/v2/render, Kodisc reserves a minimum amount of credits up-front. If your balance is below the reserve, the call fails with 402 immediately — no job is created.
2

Settle

When the render finishes, Kodisc computes the actual cost from durationMs and quality. If the actual cost exceeds the reserve, the difference is charged. If you don’t have enough to cover it, the job is marked failed and the reserve is refunded.
3

Refund

If the actual cost is below the reserve, the difference is automatically returned to your balance. Failed jobs refund the full reserve.
Credit balance is visible at any time via GET /api/v2/me — the response splits paid (purchased credits) from free (your plan’s monthly allowance).

Common 400 messages

Retry strategy

  • 400 and 401 are client errors — retrying without changes won’t help.
  • 402 clears as soon as your balance increases; retry after topping up or after the next free-credit refresh.
  • 404 is permanent for the given jobId.
  • 5xx and network errors are safe to retry; use exponential backoff (e.g. 1s → 2s → 4s, up to 5 attempts).