Docs

Errors

Codes, body shape and what to do about each.

Every error returns { code, message, hint?, issues? }. The hint says how to fix it.

HTTPcodeCommon cause
401unauthenticatedMissing API key, malformed, revoked, or the prefix disagrees with the stored type/mode.
403forbiddenpk_ key on an sk_ endpoint, Origin not allowed, or insufficient role.
404not_foundThe subject/resource does not exist (read endpoints do not create subjects).
409idempotency_key_reused_with_different_bodySame Idempotency-Key, different body.
422validation_failedThe body fails the Zod schema — see issues.
429rate_limitedSlow down; respect Retry-After.