Quickstart

Make your first API call in under three minutes. 100% OpenAI-compatible—one API key for every supported model.

1. Get an API Key

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.

2. Base URL & Authentication

All OpenAI-compatible endpoints live under /v1. Authenticate with a Bearer token in the request header.

3. Your First Request

The examples below use a live public model — just replace sk-your-key with your key and run.

Base URL

https://m3router.ai/v1

Auth header

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"}]}'

Common Error Codes

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.

CodeMeaningWhat to do
401Authentication failed: Missing or invalid Authorization header or API key.Verify your Authorization: Bearer <key> header and confirm the key is active.
402Insufficient credits: Your account balance is depleted.Add credits on the Billing page, or contact support to increase your spend limit.
429Rate 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.
500Internal server error: An unexpected upstream error occurred.Retry your request with backoff. If the issue persists, contact support with your X-Request-ID.