Skip to main content
Sandbox mode lets you test the LimitGuard API without using real data sources, making USDC payments, or consuming your monthly quota.

How to Activate

Two methods — both produce the same behavior:

Sandbox Behavior

Mock Data Examples

/v1/entity/check (sandbox)

/v1/risk/score (sandbox)

Rate Limit Response

When the sandbox rate limit is exceeded:
The response includes a Retry-After: 60 header.

Use Cases

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:
  1. Remove X-LimitGuard-Mode: sandbox header, or
  2. Switch from lg_test_ key to a lg_live_ key
No other code changes required. The same endpoints, request format, and response structure apply in both modes.