Skip to content
AgentIDDocs

Type at least two characters to search titles, headings and content.

↑ ↓ to navigate↵ to open
AgentID Docs

SDKs & API

Errors and rate limits

HTTP status codes, verdict reasons, rate-limit headers and retry rules for the Guard and Ingest APIs.

Error formats

  • Guard always answers with a verdict: { "allowed": false, "reason": "..." }.
  • Ingest, finalize and config answer errors as { "error": "...", "reason": "...", "details": { ... } }; reason and details are optional.

Guard

StatusallowedReasonsWhat to do
200truenone, or system_failure* with bypassed: trueContinue with transformed_input
200falsepii_detection_unavailable, semantic_authority_unavailable, *_unavailableFail-closed system could not complete the check; do not call the model, retry later
400falseinvalid_payloadFix the request (unknown field, wrong type, value too long)
401falseunauthorized, system_id_mismatchCheck the API key and system_id
403falsePolicy reasons, see Guard API; system_suspendedDo not call the model; show the reason
413falsepayload_too_largeReduce the body below 4 MiB
429falserate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limitWait for Retry-After
500falseserver_errorRetry with backoff
503falsesystem_failure, system_failure_db_unavailable, semantic_authority_unavailable, circuit_breakerRetry with backoff; the system is fail-closed or stopped

Ingest

StatusMeaning
200Stored (success: true, event_id)
400Invalid payload (details lists the fields) or stale_event_timestamp / invalid_timestamp
401Missing or invalid key, or system_id mismatch
403System paused: Access denied: AI system suspended (Kill Switch active).
409replay_detected: an event with this event_id is already stored; treat as success on a retry
413Body over 4 MiB
429Rate limit or daily limit of the system
503A dependency is unavailable; retry

/api/v1/ingest/finalize adds 404 (event_not_found) when no event with that client_event_id exists.

Rate limits

Limits apply per AI system: requests per minute, an optional daily request cap, optional hourly and daily token caps (set in Guardrails → Service Protection) and a short burst limit. A limited response is 429 with:

HeaderMeaning
Retry-AfterSeconds to wait
X-RateLimit-LimitAllowed requests in the window
X-RateLimit-RemainingRequests left in the window

In Shadow Mode, Guard records limit hits as simulated blocks instead of enforcing them.

Retries

  • 429: wait at least Retry-After, then retry with exponential backoff and jitter.
  • 5xx: retry with capped exponential backoff, for example 250 ms, 500 ms, 1 s, 2 s, capped at 5 s.
  • Ingest: retry with the same event_id.
  • Guard: a retry is a new check. Reuse the client_event_id so the activity log stays linked.

The official SDKs already retry: Guard up to three attempts on network errors, timeouts and 5xx; ingest on 5xx and 429.

Useful response headers

HeaderMeaning
x-correlation-idYour correlation id, or one generated by AgentID
X-AgentID-LatencyServer processing time in ms
X-AgentID-Status: BYPASSED_INFRA_ERRORGuard skipped the check in a fail-open system