Resources
Authentication
Every request carries an API key. Keys start with ms_live_ and carry their own spend and rate limits.
Last reviewed 2026-08-25
Base URLs
| SDK | Base URL |
|---|---|
openai | https://api.mserve.ai/openai/v1 (https://api.mserve.ai/v1 is an alias) |
elevenlabs | https://api.mserve.ai/elevenlabs |
| Realtime WebSocket | wss://api.mserve.ai/openai/v1/realtime |
| ElevenLabs stream-input | wss://api.mserve.ai/elevenlabs/v1/text-to-speech/{voice_id}/stream-input |
Send the key
Two headers work everywhere. The openai SDK sends the first, the elevenlabs SDK sends the second.
Authorization: Bearer ms_live_your_keyxi-api-key: ms_live_your_keyWebSocket routes also accept the browser subprotocol openai-insecure-api-key.<key>, xi_api_key in the first frame (ElevenLabs stream-input), and ephemeral client secrets (Realtime).
Keys
Prop
Type
Create and revoke keys in the console.
Inspect a key
GET /mserve/v1/key returns the calling key's limits, usage, and the account balance.
curl https://api.mserve.ai/mserve/v1/key -H "Authorization: Bearer $MSERVE_API_KEY"{
"label": "production",
"prefix": "ms_live_ab12",
"limit": 50.0,
"limit_remaining": 41.2,
"limit_reset": "monthly",
"usage_daily": 0.84,
"usage_monthly": 8.8,
"rate_limit": { "rpm": 600, "concurrency": 20 },
"balance": 91.2
}Errors
| Status | code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Missing, wrong, or revoked key. |
| 402 | insufficient_balance | The account balance is zero. |
| 402 | key_spend_limit_reached | This key hit its period ceiling. Raise it or use another key. |
{ "error": { "message": "Incorrect API key provided.", "type": "invalid_request_error", "param": null, "code": "invalid_api_key" } }