Skip to content
Theme
Upload a photo Upload
Theme
Theme
Upload a photo

Developers

Sandbox and test mode

Build against mx_test_ keys: a separate wallet that refills to 1,000 credits, simulated outputs and no real charges.

On this page
  1. What is the same as live
  2. What is different
  3. Test outcomes on purpose
  4. Test webhooks today
  5. Switching to live

Test mode lets you build and test your integration for free. Use a test key (mx_test_…) and everything happens in a separate sandbox: separate credits, separate webhooks, separate data.

What is the same as live#

  • The same URLs, request and response shapes, validation rules and error codes.
  • The same scopes, IP allowlists, rate limits and idempotency rules.
  • Webhooks are signed and retried exactly like live ones.

What is different#

Test keyLive key
livemodefalsetrue
CreditsA test wallet that is topped up to 1,000 credits, once per UTC day, on your first request of the day.Your real balance.
MoneyNever charged. Test credits cannot be moved to live.Real credits are spent.
Image and AI workAlways simulated: outputs come from our test drivers and are marked "TEST".Real models.
Webhook endpointsTest endpoints only receive test events.Live endpoints only receive live events.
DataDeleted after 30 days.Kept by the normal retention rules.

A test key can never read or change your live balance, and a live key can never see test data. Each object's livemode field tells you which side it belongs to.

curl
# Your test key from Developers → API keys. Keep it out of your code and your Git history.
export MUTEXAI_API_KEY="mx_test_..."

curl https://studio-api.mutexai.net/v1/balance \
  -H "Authorization: Bearer $MUTEXAI_API_KEY"
Response
{
  "object": "balance",
  "available": 1000,
  "livemode": false,
  "as_of": "2026-11-17T09:30:12Z"
}

Test outcomes on purpose#

Test webhooks today#

Register an endpoint with a test key, then press Send test event on the endpoint in Developers → Webhooks. It sends a signed webhook.test event. See Webhooks.

Switching to live#

  1. Create a live key with the same scopes (live keys need a verified email).
  2. Register your live webhook endpoints again with the live key. Each endpoint gets its own secret.
  3. Change the key in your server's environment. Nothing else in your code should change.

Still stuck? Email [email protected] with what you tried and, for API problems, the request_id.

Type at least 2 letters. Use the arrow keys to move and Enter to open.

    Type at least 2 letters. Use the arrow keys to move and Enter to open.