Skip to main content
MuleRouter API requests use an API key passed in the Authorization request header. Use an Inference key for model requests and an Account key for account APIs. See API keys.

Get an API key

1

Open the API Keys tab

Sign in to the MuleRouter Console and open the API Keys tab.
2

Create an inference key

Under Inference keys, click Create key. The console shows the full key string exactly once — copy it to a secret store immediately.
3

Name the key

Use a name that identifies its workload. You can disable or revoke the key from the same page.
The full API key is shown only once at creation. If you lose it, you cannot recover it — generate a new one and rotate.

Send authenticated requests

Include the key as a Bearer token in the Authorization header:
A minimal cURL request:
Use this inference key for LLM, image, video, speech, music, async task, and task-status requests. Account APIs require a separate Account key.

SDK setup

Most OpenAI-compatible SDKs accept a base_url override. Point it at MuleRouter and they “just work”:

Best practices

  • Never commit keys to source control. Use environment variables, .env files (gitignored), or a secret manager.
  • Rotate aggressively. Generate a new key when a teammate leaves, when you suspect a leak, or on a fixed cadence.
  • One key per workload. Per-service keys make leaks easy to scope and revoke without disrupting unrelated traffic.
  • Server-side only. Treat the key like a database password — never ship it in a browser bundle or mobile app.

Errors

The full code list lives in Error codes.