# Welcome
Source: https://docs.mserve.ai/docs
Summary: Open models behind OpenAI-compatible and ElevenLabs-compatible endpoints. Change the base URL. Keep your code.
Availability: available
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](/docs/quickstart): First chat completion with the OpenAI SDK in under a minute.

- [Voice](/docs/voice): Text to speech, streaming, speech to text, cloning, and speech to speech. OpenAI and ElevenLabs shapes.

- [Text](/docs/text): Chat completions, completions, responses, and embeddings.

- [Realtime](/docs/voice/realtime): Voice agents: the OpenAI Realtime API. Speech in, spoken answer out, one WebSocket.

- [Batch](/docs/batch): OpenAI Files and Batches. 24h window or the Flex tier.

- [API Reference](/docs/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.

**Python**

```python
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)
```

**JavaScript**

```ts
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.mserve.ai/openai/v1", apiKey: "ms_your_key" });

const response = await client.chat.completions.create({
  model: "qwen3.8-27b",
  messages: [{ role: "user", content: "Write one sentence about GPUs." }],
});
console.log(response.choices[0].message.content);
```

**cURL**

```bash
curl https://api.mserve.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer $MSERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.8-27b",
    "messages": [{"role": "user", "content": "Write one sentence about GPUs."}]
  }'
```

The same applies to voice with the ElevenLabs SDK at `https://api.mserve.ai/elevenlabs`:

```python
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.

```text
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](/docs/voice)                                                                 |
| Speech to text        | OpenAI `audio.transcriptions` and `audio.translations`, ElevenLabs `speech_to_text`              | [Speech to Text](/docs/voice/speech-to-text)                                         |
| Voice Cloning         | ElevenLabs `voices.add`, edit, delete, samples                                                   | [Voice Cloning](/docs/voice/voice-cloning)                                           |
| Voice Changer         | ElevenLabs `speech_to_speech` with preset or cloned targets                                      | [Voice Changer](/docs/voice/voice-changer)                                           |
| Text                  | OpenAI chat completions, completions, responses, embeddings                                      | [Text](/docs/text)                                                                   |
| Realtime voice        | OpenAI Realtime API over WebSocket                                                               | [Realtime](/docs/voice/realtime)                                                     |
| Batch                 | OpenAI files and batches, 24h and Flex tiers                                                     | [Batch](/docs/batch)                                                                 |
| Keys, limits, billing | `GET /mserve/v1/key`, per-key limits, card top-ups                                               | [Authentication](/docs/resources/authentication), [Billing](/docs/resources/billing) |

Usage is billed per request against a prepaid balance. The [API Reference](/docs/api-reference) lists every route with its request and response schema.

## Prices

Full tables on [Pricing](/docs/pricing).

| Model | Model id | Input per 1M tokens | Output per 1M tokens |
| --- | --- | --- | --- |
| Qwen3.8 27B | `qwen3.8-27b` | $0.30 | $2.50 |
