Errors and limits
Errors are RFC 9457 problems and are never billed. An abstention is not an error.
When the data cannot support an answer, the response is HTTP 200 with a typed abstention. Read about abstentions.
The problem shape
Content type application/problem+json.
- title
- stringRequired
- status
- integerRequired. The HTTP status
- code
- stringRequired. A code from the table below
- detail
- stringOptional
Problem codes
| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_REQUEST | Malformed JSON, unknown fields, bad filter, limit exceeded |
| 401 | UNAUTHENTICATED | Missing, malformed, or revoked key |
| 402 | PAYMENT_REQUIRED, SPEND_LIMIT_REACHED | No balance or plan, or the daily cap was hit |
| 403 | FORBIDDEN_SCOPE | The key lacks the required scope |
| 404 | NOT_FOUND | Unknown response, job, document, or reserved route |
| 409 | IDEMPOTENCY_CONFLICT | Same idempotency key with a different body |
| 413 | PAYLOAD_TOO_LARGE | Body or upload over the limit |
| 422 | UNPROCESSABLE | Well-formed but semantically invalid |
| 429 | RATE_LIMITED | Rate limit or per-tenant model cap |
| 500 | INTERNAL, POLICY_ASSERT_FAILED, RESPONSE_UNREPLAYABLE | Server fault. The last two also alert |
| 503 | STORE_UNAVAILABLE, LLM_UNAVAILABLE, LOG_UNAVAILABLE | A dependency is down or a budget tripped |
| 504 | TIMEOUT | A deadline was exceeded |
Rate limits
Query routes return the bucket's state on every response. Past it, the route returns 429 RATE_LIMITED.
- RateLimit-Limit
- The bucket's size.
- RateLimit-Remaining
- Tokens left in it.
- RateLimit-Reset
- Seconds until it is full.
The daily cap
When the daily cap is hit, calls return 402 SPEND_LIMIT_REACHED until it resets. With no balance or plan they return 402 PAYMENT_REQUIRED. Neither is billed.
Request limits
Over a limit, a field returns 400 INVALID_REQUEST; a body over the size limit returns 413 PAYLOAD_TOO_LARGE.
- question (ask)
- 2000 characters
- references (fetch)
- 100
- fields
- 50
- mentions (resolve)
- 100
- limit (search, changes)
- 500
- request (field request)
- 1000 characters