Error envelope

OpenAI-exact, on every error:
Official OpenAI SDKs map by HTTP status. The two 429s are distinguished by code: insufficient_quota means buy credits or raise your plan, not retry.

Rate limits

Per-account request limits by plan (concurrency = simultaneous in-flight turns). All your keys share one budget — creating more keys does not raise it. Every response carries x-ratelimit-limit-requests, x-ratelimit-remaining-requests, x-ratelimit-reset-requests (duration format, e.g. 6m0s), and retry-after (seconds) on a 429. Token-based limits are not metered in v1 — credits are the real budget. File endpoints are limited separately from completions.

Credits

Every turn charges RavChat credits from your account’s pools (plan allowance + purchased packs). usage.cost on the response is the charge for that turn — non-streaming responses also carry it in the x-ravchat-credits header; streams deliver it in the final chunk. When a spending bucket is exhausted you get 429 insufficient_quota before the turn runs — never a partial charge.