Welcome
Open models behind OpenAI-compatible and ElevenLabs-compatible endpoints. Change the base URL. Keep your code.
Last reviewed 2026-08-25
Open models, served behind the APIs you already use. The official openai and elevenlabs SDKs work with one change: the base URL.
Quickstart
First chat completion with the OpenAI SDK in under a minute.
Voice
Text to speech, streaming, speech to text, cloning, and speech to speech. OpenAI and ElevenLabs shapes.
Real-time
Chat completions, completions, responses, and embeddings.
Realtime over WebSocket
Voice agents: the OpenAI Realtime API. Speech in, spoken answer out, one WebSocket.
Batch
OpenAI Files and Batches. 24h window or the Flex tier.
API Reference
Every route with request and response schemas.
One line to switch
Point the SDK at https://api.mserve.ai/openai/v1 and use an ms_ key. Everything else stays the same. https://api.mserve.ai/v1 works too.
from openai import OpenAI
client = OpenAI(base_url="https://api.mserve.ai/openai/v1", api_key="ms_your_key")
response = client.chat.completions.create(
model="qwen3.8-27b",
messages=[{"role": "user", "content": "Write one sentence about GPUs."}],
)
print(response.choices[0].message.content)The same applies to voice with the ElevenLabs SDK at https://api.mserve.ai/elevenlabs:
from elevenlabs.client import ElevenLabs
client = ElevenLabs(base_url="https://api.mserve.ai/elevenlabs", api_key="ms_your_key")
audio = b"".join(client.text_to_speech.convert(voice_id="21m00Tcm4TlvDq8ikWAM", text="Every model. One API."))Let your agent make the switch
Paste this into Claude Code, Cursor, Codex, or any coding agent with access to your repo. It reads these docs as Markdown and makes the change.
Switch this codebase from OpenAI and ElevenLabs to mserve.ai. Keep the official SDKs. 1. Read https://docs.mserve.ai/llms.txt. For any page you need, append .md to its URL to get Markdown. 2. OpenAI SDK clients: set base_url to https://api.mserve.ai/openai/v1 and read the key from MSERVE_API_KEY. Model ids: chat and completions qwen3.8-27b, embeddings qwen3-embedding-0.6b, transcription whisper-large-v3, speech kokoro-82m. Full list: https://docs.mserve.ai/docs/pricing.md 3. ElevenLabs SDK clients: set base_url to https://api.mserve.ai/elevenlabs and read the key from MSERVE_API_KEY. Voice ids and model ids keep working. 4. Remove parameters listed as rejected in https://docs.mserve.ai/docs/resources/compatibility.md. 5. Run the test suite. Show me the diff before you commit.
Products
| Product | Works with | Docs |
|---|---|---|
| Text to speech | OpenAI audio.speech, ElevenLabs text_to_speech incl. timestamps and WebSocket stream-input | Voice |
| Speech to text | OpenAI audio.transcriptions and audio.translations, ElevenLabs speech_to_text | Speech to Text |
| Voice cloning | ElevenLabs voices.add, edit, delete, samples | Custom Voices |
| Speech to speech | ElevenLabs speech_to_speech with preset or cloned targets | Speech to Speech |
| LLM | OpenAI chat completions, completions, responses, embeddings | Real-time |
| Realtime voice agents | OpenAI Realtime API over WebSocket | Realtime over WebSocket |
| Batch | OpenAI files and batches, 24h and Flex tiers | Batch |
| Keys, limits, billing | GET /mserve/v1/key, per-key limits, card top-ups | Authentication, Billing |
Usage is billed per request against a prepaid balance. The API Reference lists every route with its request and response schema.
Prices
Full tables on Pricing.
| Model | Model id | Input per 1M tokens | Output per 1M tokens |
|---|---|---|---|
| Qwen3.8 27B | qwen3.8-27b | $0.30 | $2.50 |