Credits & errors
Error codes
Every error code the API returns, by family, with what to do about each.
Every error carries a machine-readable code from the closed set below. Branch on code, never on detail. The response shape and retry rules are in Errors.
To see which code a request returns, read the field straight from the body:
curl -s -X POST https://api.sproutsdata.ai/v1/search \
-H "X-API-Key: $SPROUTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "fintech companies in berlin", "category": "company", "limit": 500}' | jq -r .codeThis prints request.invalid. A successful response has no top-level code, so the same command prints null.
Each code's type URL is https://dashboard.sproutsdata.ai/errors/<slug>, where the slug is the code with . and _ replaced by -. It redirects to that code's entry on this page.
auth.*#
Authentication and authorization.
request.*#
The request itself is the problem.
| Code | Status | When you see it | What to do |
|---|---|---|---|
request.invalid | 422, 400, 404 | 422: field validation failed — a bad value, an unknown parameter, a missing query/filters, an over-cap batch, or the retrieval engine rejected the query. extra.errors[] names the fields, and each entry's msg is written to be shown to a developer. 400: POST /v1/agents/runs without an Idempotency-Key, or with one longer than 255 characters. 404: an agent run id that doesn't exist or belongs to another workspace, or an unknown path (see the http-<status> fallback) | Fix the request. Do not retry unchanged |
request.too_large | 413 | Reserved: the request body exceeds the size cap | Send a smaller body |
request.unsupported | 422, 415, 404, 501, 503 | 422: a relationship question in words that the graph cannot answer; extra.kind names the reason and extra.try_instead, when present, suggests another way to ask. 415: wrong content type, e.g. a form-encoded body on a session POST. 404, 501, 503: a feature that is not enabled or configured in this deployment, such as relationships or top-up links | 422: rephrase, or follow extra.try_instead. 415: send Content-Type: application/json. 404, 501, 503: do not retry; the deployment does not offer it |
The validation payload shape:
{
"code": "request.invalid",
"detail": "One or more fields failed validation.",
"extra": {
"errors": [
{ "type": "less_than_equal", "loc": ["body", "limit"], "msg": "Input should be less than or equal to 100", "input": 500, "ctx": { "le": 100 } }
]
}
}relationship.*#
Its own namespace rather than request.invalid, because the request was valid: you named something the corpus holds more than one of. A client should branch on that differently than on a malformed body — the same reasoning that keeps auth.* separate from request.*.
| Code | Status | When you see it | What to do |
|---|---|---|---|
relationship.anchor_ambiguous | 422 | A company named by name — on any /v1/relationships* route, including inside a sentence sent to /ask — matched more than one record | Read extra.anchor (what you sent) and extra.candidates (what it could have been) and let someone pick. Anchoring by domain avoids it entirely |
feedback.*#
The feedback routes. Reporting a bad result is free, so neither of these is ever a billing question.
lists.*#
The saved lists routes. Lists are free, so none of these is a billing question.
export.*#
pagination.*#
All 422s. Recovery is always the same: throw the cursor away and re-run the search from page 1. See Pagination.
idempotency.*#
Reserved: no route sends either code today. A reused Idempotency-Key never produces an error:
- On the billed routes that honour it, the same key with the same body on the same UTC day is recognised as a retry. The same key with a different body silently starts a new request.
- On
POST /v1/agents/runs, the key is required, and a reused key returns the original run's handle with200instead of202, whatever the body says. It starts and charges nothing. Run keys never expire and are scoped to your workspace.
quota.*#
Infrastructure protection — always 429, never a billing question. Every workspace has a per-operation request limit (see Rate limits), and the codes below are every limit that exists. Honour Retry-After whenever it is present.
| Code | Status | When you see it | What to do |
|---|---|---|---|
quota.burst_exceeded | 429 | Too many requests in a short window, with Retry-After. Sent when your workspace exceeds its per-operation rate limit (60 requests a minute by default), with extra carrying limit, window and operation. Also sent by the playground's session throttles (30 requests a minute and 500 a day), the sign-in throttle, and the MCP server (60 calls a minute per credential) | Wait Retry-After seconds. Spread steady traffic using the X-RateLimit-Remaining header. If you're automating through the playground, use an API key instead |
quota.daily_exhausted | 429 | Reserved: never sent today | Treat like quota.burst_exceeded |
quota.monthly_exhausted | 429 | Reserved: never sent today | Treat like quota.burst_exceeded |
quota.concurrency_exceeded | 429 | Sent only by POST /v1/agents/runs: more than 5 runs are being started at the same moment by one credential. Carries Retry-After: 30 | Wait Retry-After seconds, then retry with the same Idempotency-Key |
quota.entity_ceiling | 429 | Sent only by POST /v1/agents/runs: the credential has been shown 5,000,000 distinct records (the default ceiling) in the last 30 days, through searches and run results. extra carries seen and limit | Contact us to raise the ceiling |
credits.*#
Commercial — a different family from quota.* by design, and the two are never conflated. A 402 is fixed by buying; a 429 is fixed by waiting. See Credits & usage.
payment.*#
Buying credits, on the dashboard's billing routes. Separate from credits.* because the failures are the buyer's to fix rather than a spend outcome:
- a 402
credits.insufficientmeans "you have none"; - a 402
payment.declinedmeans "the card was refused", and sending it to a top-up screen is a dead end.
Almost all of these are reachable only with a signed-in dashboard session. The exception is payment.topup_not_found, which comes from the two top-up link routes that any credential can call. The rest are listed because code is a closed set and this page is the whole of it, as are the dashboard-only codes below.
upstream.*#
The retrieval engine or the agent engine failed. A metered call is charged only once its response is ready, so neither of these is charged. On search and lookup routes both carry Retry-After: 5.
history.*#
| Code | Status | When you see it | What to do |
|---|---|---|---|
history.not_found | 404 | The run_id sent to GET /v1/usage/history/{run_id} is unknown, past the 90-day retention, or belongs to another credential — deliberately indistinguishable | Take ids from a fresh GET /v1/usage/history page; don't retry |
Other#
| Code | Status | When you see it | What to do |
|---|---|---|---|
not_implemented | 501 | The server is the limitation, not your request: a category whose index isn't wired in this environment, or a capability that isn't built yet. detail says which capability | Disable the feature; don't retry. For the cases request.unsupported covers instead, see its entry |
internal | 500 | An unexpected error on our side. No stack trace ever leaks; the details are logged against request_id | Quote the request_id to support |
Dashboard only#
An API key never receives these. They come from routes that need a signed-in dashboard session, and are listed so that every code has an entry.
