API tokens
All/v1/ endpoints authenticate via an API token. Tokens:
- Start with the prefix
ab_ - Are 51 characters long
- Are scoped to a single organization
- Never expire (but can be revoked instantly)
Authorization header
Pass your token in theAuthorization header on every request:
401 unauthorized.
Check your balance
Before submitting compute jobs, verify your credit balance with:Rate limits
Every/v1/ response carries rate-limit headers:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per minute |
X-RateLimit-Remaining | Requests left in the current window |
X-RateLimit-Reset | RFC 7231 timestamp when the window resets |
X-Quota-Limit | Write requests allowed this calendar month |
X-Quota-Remaining | Write requests left this month |
X-Quota-Reset | RFC 7231 timestamp when the monthly quota resets |
| Plan | Rate | Monthly writes |
|---|---|---|
| Team | 60 req/min | 25,000 |
| Enterprise | custom | custom |
429 with a Retry-After header giving the seconds until the window resets.
Errors
All error responses use RFC 9457 problem+json withContent-Type: application/problem+json.
code field — it is stable across API versions.
code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | Missing or invalid token |
not_found | 404 | Resource doesn’t exist in your org |
insufficient_credits | 402 | Not enough credits — top up or upgrade |
plan_required | 402 | Endpoint requires a higher plan |
rate_limit_exceeded | 429 | Slow down — check Retry-After |
quota_exceeded | 429 | Monthly write quota exhausted |
invalid_request | 400 | Malformed body |
validation_failed | 422 | Field-level validation error — see errors array |
idempotency_mismatch | 422 | Same Idempotency-Key with different body |
conflict | 409 | e.g. canceling an already-running job |
internal_error | 500 | Something went wrong on our side |
Python SDK error handling
Idempotency
All write endpoints accept anIdempotency-Key header. Send a unique UUID per logical operation — replayed requests with the same key return the cached response without creating a duplicate job or spending credits twice.
422 idempotency_mismatch.