# Mia21

> The LLM gateway that remembers your users — and can speak.

Mia21 is an **OpenAI-compatible LLM gateway** with **persistent memory** and **streaming voice** on one API key. Prepaid usage from **$5**. **Zero markup** on model tokens.

- Website: https://mia21.com
- Console: https://app.mia21.com
- Docs: https://docs.mia21.com
- API: https://api.mia21.com
- LLM discovery: https://mia21.com/llms.txt

## Who it is for

Product teams shipping AI agents, copilots, and support bots who want:

1. Multi-model access (GPT, Claude, Gemini, …) without rewriting apps
2. Per-user long-term memory without running a separate vector stack
3. TTS / voice on the same wallet and context as chat
4. Pricing finance can understand (prepaid, transparent rates)

## Quick start (OpenAI SDK)

```python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_MIA21_KEY",
    base_url="https://api.mia21.com/v1",
)

r = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Pick up where we left off."}],
    user="user_123",  # enables persistent memory for this end user
)
print(r.choices[0].message.content)
```

## Official SDKs

```bash
pip install mia21
npm install mia21
```

See [sdks.md](https://mia21.com/sdks.md).

## Product pillars

### Unified models
OpenAI-compatible `/v1` endpoint. Switch models without rewriting your app.

### Persistent memory
Pass a stable `user` id. Mia extracts and retrieves long-term context automatically.

### Streaming voice
TTS shares the same API key, prepaid wallet, and memory as chat.

### Transparent prepaid pricing
No free credits. Load a wallet, spend down like a fuel gauge. Credits never expire.
Managed model tokens = provider cost + published provider tax. **0% token markup.**

## Pricing summary

| Item | Value |
|------|-------|
| Minimum first load | $5 |
| Credit value | 1 credit = $0.001 |
| Token markup | 0% |
| Top-up platform fee | ~5.5% |
| BYOK platform fee | published per 1M tokens |

Full details: [pricing.md](https://mia21.com/pricing.md) · Live JSON: https://api.mia21.com/api/v1/credits/pricing/table

## How to get started

1. Create an account at https://app.mia21.com and load at least $5
2. Copy your Mia API key
3. Set `base_url` to `https://api.mia21.com/v1` (or install the Mia21 SDK)

## Related files

- [llms.txt](https://mia21.com/llms.txt)
- [llms-full.txt](https://mia21.com/llms-full.txt)
- [pricing.md](https://mia21.com/pricing.md)
- [sdks.md](https://mia21.com/sdks.md)
