How to Activate
Two methods — both produce the same behavior:- Header-Based (Recommended)
- Test Key Prefix
Add Works with any API key (live or test). The header takes precedence.
X-LimitGuard-Mode: sandbox to any request:Sandbox Behavior
| Property | Behavior |
|---|---|
| Data sources | No real sources called (KVK, sanctions, VIES, etc.) |
| Responses | Deterministic mock data — same input always gives same output |
| Payments | No USDC payment required — x402 is skipped |
| Quota | Not consumed |
| Rate limit | 10 requests per minute per IP |
Mock Data Examples
/v1/entity/check (sandbox)
/v1/risk/score (sandbox)
Rate Limit Response
When the sandbox rate limit is exceeded:Retry-After: 60 header.
Use Cases
| Scenario | Recommendation |
|---|---|
| First-time integration | Header sandbox + any API key |
| CI/CD automated tests | lg_test_ prefix key in env vars |
| Frontend development | Header sandbox to avoid quota |
| Load testing | Sandbox — never load test production |
| Demo / prototype | Header sandbox |
Middleware Execution Order
Sandbox detection runs before x402 payment verification in the middleware stack:This means sandbox mode skips payment verification entirely. The x402 middleware sees the sandbox flag and passes through without checking for payment.
Transitioning to Production
When ready to use real data:- Remove
X-LimitGuard-Mode: sandboxheader, or - Switch from
lg_test_key to alg_live_key