Skip to main content
A sandbox key lets you build and test a direct API integration before you fund live calls. Use it in automated tests and CI checks.

How it works

Locus checks the key and the request, then returns a simulated response with billing headers in the live format. No provider is called, no credits move, and no call history is created.
Use sandbox for request handling and automated tests. Verify provider-specific content with a live call before launch.

Create a key

1

Open API keys

In your enterprise workspace, open Connect → API keys and select Create key.
2

Choose Testing

Choose Testing. Store the lcrsb_… value; it is shown once.
Sandbox keys rotate and expire like other workspace keys; see Key lifecycle.

Make a test call

Make a sandbox call
The response has X-Locus-Sandbox: true, a call ID, and simulated charge and balance headers in your workspace’s credit denomination. Your balance never changes.

What sandbox covers

  • Selected providers return approximate fixtures; others return a generic sandbox response. Don’t use them to verify a provider-specific parser.
  • Sandbox keys work on the REST API only, not on MCP or the management API.
Sandbox doesn’t detect reusing an idempotency key for a different request. Live calls do.

Next steps

Sandbox tests leave no balances or test users behind. If you create live test identities, follow Clean up integration tests.

API keys

Pick the right key for each place your code runs.

Clean up integration tests

Retire live test users when you’re done.