Make your first API call in under three minutes. 100% OpenAI-compatible—one API key for every supported model.
Sign up and generate a secret key on the API Keys page. Your full key is only displayed once upon creation—be sure to store it securely.
All OpenAI-compatible endpoints live under /v1. Authenticate with a Bearer token in the request header.
The examples below use a live public model — just replace sk-your-key with your key and run.
https://m3router.ai/v1
Authorization: Bearer lxr-your-api-key
curl https://m3router.ai/v1/chat/completions \
-H "Authorization: Bearer lxr-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model": "LingxiNova-M1", "messages": [{"role": "user", "content": "Hello"}]}'Error responses are returned as standard JSON ({"detail": "..."} or an OpenAI-compatible error envelope). Please include the X-Request-ID response header when contacting support.
| Code | Meaning | What to do |
|---|---|---|
| 401 | Authentication failed: Missing or invalid Authorization header or API key. | Verify your Authorization: Bearer <key> header and confirm the key is active. |
| 402 | Insufficient credits: Your account balance is depleted. | Add credits on the Billing page, or contact support to increase your spend limit. |
| 429 | Rate limit exceeded: You have hit your RPM/TPM/RPD or daily key limit. | Implement exponential backoff and retry, or contact us to request higher concurrency limits. |
| 500 | Internal server error: An unexpected upstream error occurred. | Retry your request with backoff. If the issue persists, contact support with your X-Request-ID. |