/v1/* errors use this envelope:
OpenAI / Gemini SDK routes return vendor-shaped errors. Native REST (
/v1/run, /v1/account, etc.) uses the table below.Error code catalog
Codes below match the live Public API (ApiErrorCode in apisale-service).
Examples
Concurrency (429):Run failures (HTTP 200)
Failed runs returnstatus: "failed" with:
error.type uses the same machine-readable strings as error.code in HTTP errors.
Billing outcomes
apisale pre-holds the estimated amount when an accepted run starts. The final charge is created only when the run reachessucceeded / completed.
Use the Run history in Console to see the final status and charged amount for
each request. A pricing preview is an estimate; the completed run is the source
of truth for the final amount.
Concurrency tiers
Parallel runs per organization (by lifetime paid):
Enterprise overrides are set by apisale admins (
concurrency_override).
Response headers
X-RateLimit-* appears only when an admin has set a per-key HTTP cap.
Client recommendations
- Branch on
error.code, not HTTP status alone (429 = concurrency or optional rate cap) - Poll
GET /v1/accountbefore burst traffic - On
insufficient_balance(402), pause billing workflows - On
content_policy_violation(451), do not blind-retry - Exponential backoff on
service_unavailableandconcurrency_limit_exceeded
