Skip to Content

Create a sandbox customer

Create the customer

Switch to sandbox

Turn on the Sandbox switch in the dashboard header.

Open the project

Open the Sandbox project.

Open the customers tab

Select Customers. Only Sandbox projects show Create customer.

Select Create customer

Modem creates a synthetic customer. From the customer’s actions, select Copy customer ID and Copy customer secret. Synthetic gateway authentication needs both. Keep the secret private.

Create the customer with the CLI

First configure a CLI target and login that can access the Sandbox project. modem-cli customers create creates a synthetic customer. Output omits sandboxSecret unless you explicitly request it with --show-sandbox-secret.

The secret signs in that customer. Avoid putting secret-bearing output in shared logs. Synthetic Sandbox requests can retain supported debug content; use suitable test data and review content retention.

modem-cli customers create --project-id <project-id> --show-sandbox-secret

Creating the customer provisions the project’s default product. Before a completion, connect that product’s provider account and add an applicable usage allowance. A synthetic identity does not bypass product rules.

Run a test completion

modem-cli customers complete runs a chat completion billed to a customer. It takes the project, customer, and product IDs, the provider, and either --model with --prompt or a JSON file in --request.

modem-cli customers complete \ --project-id <project-id> \ --customer-id <customer-id> \ --product-id <product-id> \ --provider openai \ --model gpt-4o-mini \ --prompt "Hello"

The command streams by default. --no-stream waits for the whole response. --json prints the full response, or one JSON object per chunk.

--request - reads the request JSON from stdin. Choose exactly one input form: model plus prompt, or a request file/stdin. The command obtains customer authentication through the admin API; it does not require you to paste the synthetic secret into its arguments. Press Ctrl+C to cancel the request.

Sandbox inference can still incur provider charges. This example is a real request, not an emulator. Use a model available to the connected account and review Gateway errors if access is refused.