Skip to main content
API keys authenticate requests to the Muxx gateway and SDK. Each project has its own keys.

Key Types

Live Keys

muxx_sk_live_xxxxxxxxxxxxxxxxxxxx
  • Used in production
  • Full logging and analytics
  • Rate limits and spend caps apply

Test Keys

muxx_sk_test_xxxxxxxxxxxxxxxxxxxx
  • Used in development
  • Logged separately from production
  • Useful for testing without polluting prod data

Creating Keys

  1. Navigate to your project
  2. Go to SettingsAPI Keys
  3. Click Create Key
  4. Choose Live or Test
  5. Add an optional description
  6. Click Create
The full key is only shown once. Copy it immediately and store it securely.

Using Keys

Gateway

Include the key in the X-Muxx-Api-Key header:
curl https://gateway.muxx.dev/v1/chat/completions \
  -H "X-Muxx-Api-Key: muxx_sk_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "messages": [...]}'

SDK

Pass the key when initializing:
from muxx import Muxx

muxx = Muxx(api_key="muxx_sk_live_xxxxxxxxxxxx")
Or use environment variable:
export MUXX_API_KEY="muxx_sk_live_xxxxxxxxxxxx"
from muxx import Muxx

muxx = Muxx()  # Automatically reads MUXX_API_KEY

Rotating Keys

To rotate a key without downtime:
  1. Create a new key
  2. Update your application to use the new key
  3. Deploy the change
  4. Delete the old key

Deleting Keys

  1. Go to SettingsAPI Keys
  2. Find the key to delete
  3. Click Delete
  4. Confirm deletion
Deleted keys are immediately invalidated. Any requests using the key will fail.

Key Security

Use environment variables or secret management systems.
Production and staging should have separate keys.
Rotate keys periodically, especially if team members leave.
Check logs for unexpected requests or patterns.

Key Limits

PlanKeys per Project
Free2
Pro10
EnterpriseUnlimited