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

SDKBase URL
openaihttps://api.mserve.ai/openai/v1 (https://api.mserve.ai/v1 is an alias)
elevenlabshttps://api.mserve.ai/elevenlabs
Realtime WebSocketwss://api.mserve.ai/openai/v1/realtime
ElevenLabs stream-inputwss://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_key
xi-api-key: ms_live_your_key

WebSocket 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"
Response
{
  "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

StatuscodeMeaning
401invalid_api_keyMissing, wrong, or revoked key.
402insufficient_balanceThe account balance is zero.
402key_spend_limit_reachedThis key hit its period ceiling. Raise it or use another key.
401
{ "error": { "message": "Incorrect API key provided.", "type": "invalid_request_error", "param": null, "code": "invalid_api_key" } }

On this page

Share feedback