Reference

Errors

Stable codes, and what each one means.

Every failure carries a machine-readable code and an explicit HTTP status. Client-facing codes are append-only, one never changes meaning.

CodeStatusMeaning
invalid_api_key401The key is unknown, revoked, or expired
insufficient_credit402Not enough available balance to start
spend_cap_exceeded402The hold ran out mid-stream
unknown_model404No alias by that name in this bundle
usage_unmeasurable500The provider reported no usage, nothing was billed

usage_unmeasurable is deliberately a 500 that pages. We would rather take an incident than bill a guess.