Skip to main content

Errors

Error responses carry a message, a machine-readable code, and sometimes details:

json
{ "error": "Validation error", "code": "VALIDATION_ERROR", "details": {} }
StatusCodeMeaning
400BAD_REQUESTThe request is malformed or the state does not allow it.
400VALIDATION_ERRORThe body failed schema validation. details carries the field errors.
401UNAUTHORIZEDMissing, unknown, revoked or expired key.
403FORBIDDENAuthenticated but not allowed, including API keys on session-only endpoints.
404NOT_FOUNDNo such resource, or no access to it. Kosuke does not distinguish the two.
402CREDIT_LIMIT_REACHEDOut of free credits. details carries usedUsd and limitUsd.
409JOB_IN_PROGRESSA job is already running in this session and could not be steered.
409JOB_STOPPEDThe run you targeted was stopped on purpose.
429TOO_MANY_REQUESTSRate limited.
503SERVICE_UNAVAILABLETransient. Retrying the same request is correct.
500SERVER_ERRORUnexpected.

A presented but invalid key is terminal. It will not fall through to a session cookie that happens to be on the same request.