Sandbox mode
Live and Sandbox modes
Modem keeps Live and Sandbox records apart: projects, products, customers, usage, and provider accounts. Use Sandbox to test your integration. Both modes run on the same Modem services.
The dashboard’s Sandbox switch shows Sandbox records when on and Live records when off. It does not copy or convert records.
Sandbox does not simulate AI providers. A Sandbox request goes to the real provider with the provider account’s key, and the provider can charge that account. A Sandbox project that uses Stripe needs Stripe test-mode keys.
Create a sandbox project
- Turn on Sandbox in the dashboard header.
- Open the Projects page .
- Select New project.
- Enter a project name.
- Select Create.
The project and its Free product are Sandbox records. See Create a project.
Test with sandbox customers
Only Sandbox projects can have synthetic customers. Create one in the dashboard or with modem-cli customers create --project-id <id>. A synthetic customer has a secret for the gateway’s synthetic authentication, so you can test requests before you set up an identity provider. The secret is not a session token.
Identity-provider sessions also work in Sandbox, with customer tokens.
The gateway retains supported customer content only for authenticated synthetic requests in Sandbox mode; a normal Sandbox customer session does not opt in. See content retention for omitted text and the distinction between live tails and stored request records.
See Create a sandbox customer.
Going live
Create separate Live records with live purchase-provider credentials. Do not move Sandbox records into Live.
Check the environment boundary
The app switch, project mode, admin key permissions and CLI target are separate controls. Verify the project ID and target before running a script. A key restricted to Live does not gain Sandbox access because the app switch is on.
Use CLI targets for repeatable targets and Backups for explicit mode selection during export. Restoring a backup cannot convert existing Live records to Sandbox or the reverse.