Docs
Errors, limits & retries
In short: every error has the same shape, only 429, 503 and 504 are worth retrying, and failed requests are never billed. Every response, errors included, carries an x-request-id; quote it when you contact support.
Status codes
| Status | Meaning |
|---|---|
200 | Checked. |
400No retry |
|
401No retry |
|
402No retry |
|
413No retry |
|
422No retry |
|
429Retry |
|
503Retry |
Both carry |
504Retry | Gateway timeout. Rare; treat it like 503. |
Limits
| Limit | Value |
|---|---|
| Checks per batch | 64(POST /v1/guard/batch and the guard_batch MCP tool) |
| Characters per field | 20,000(action text or JSON, intent, user_message, context) |
| Constraints per check | 32 |
| Conversation turns | 50The model reads about 384 tokens per check in total; longer input is trimmed (the newest turns and recipient or target fields are kept) and the response says truncated: true. Send only the context that matters for this action. |
| Body size | 512 KB |
| Rate limit | 3,000 requests per 10 sper workspace, across all its keys (write to support@mcp-guard.ai to raise it) |
What is billed
A successful check costs 1 credit; a batch of N checks costs N credits. While the workspace has free requests left, a request (a single check or a whole batch) uses one of them instead. Any request that fails, for whatever reason, costs nothing. See pricing.
Retry policy with exponential backoff
Retry 429, 503 and 504 (and network errors) with jittered exponential backoff; never retry other 4xx errors. The small random jitter stops many clients from retrying at the same instant. If the guard stays unreachable, decide on a fallback in advance: most agents should treat the action as ask.
Capacity is saturated for a moment: two 503s, then success.
- t=0.00s attempt 1 → 503 · wait 0.37s (0.25·2^0 = 0.25s + 0.12s jitter)
- t=0.49s attempt 2 → 503 · wait 0.57s (0.25·2^1 = 0.5s + 0.07s jitter)
- t=1.18s attempt 3 → 200
Running…
Timeouts and failover
Checks run on our GPUs in Switzerland. A warm check takes about 15 ms of model time, plus your network round trip. If those GPUs do not answer within 2 seconds, or answer with an error, the API fails over to the same model on RunPod GPUs in EU data centres. Those workers scale to zero: when one has to start first, a failover can take tens of seconds (we wait up to 45 s). Workspaces set to Swiss-only processing never fail over; they get a 503 residency_unavailable instead.
Pick your client timeout with that in mind. The recipes use 10 seconds: enough for a quick failover, and on a slow one the call is treated as ask rather than waiting. If you would rather wait for an answer than ask a person, use about 50 seconds. Either way, never treat a timeout or a 5xx as allow: every 503 says so in its body.
The x-guard-backend response header says which backend answered: local (Switzerland), runpod (EU failover) or none.
Errors over MCP
The MCP server reports authentication and rate-limit failures as HTTP errors with a JSON-RPC error body, and tool problems (invalid arguments, not enough credits, inference busy) as a normal tool result with isError: true and a plain-English message. When inference is unavailable that result carries fallback_verdict: "ask", and the message tells the model to confirm with the user rather than run the action. See MCP server.