# Auto API

https://getmegabrain.com/models/mb-auto/plan · prices from the live MegaBrain catalogue

> Picks the model for you: the strongest frontier model (Claude) while your plan’s frontier limits have room, then MegaBrain Core (open models such as GLM and Kimi) until they reset. Without a plan it uses MegaBrain Core, paid from credits in the desktop app.

| | |
|---|---|
| Model ID | `mb-auto/plan` |
| Provider | MegaBrain |
| Context window | 1,000,000 tokens |
| Input tokens | $3.34 per 1M tokens |
| Output tokens | $17 per 1M tokens |
| Accepts | Text and Images |
| Produces | Text |
| Max output tokens | 64,000 |

## Call it

```python
from openai import OpenAI

client = OpenAI(base_url="https://getmegabrain.com/api/gateway/v1", api_key="YOUR_MEGABRAIN_KEY")
reply = client.chat.completions.create(
    model="mb-auto/plan",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)
```

## FAQ

**How much does the Auto API cost?**

$3.34 per 1M input tokens and $17 per 1M output tokens, charged from a prepaid US-dollar balance for the tokens actually used. There is no subscription.

**What is the context window of Auto?**

1,000,000 tokens (1M), with up to 64,000 tokens in one reply.

**How do I call Auto through the API?**

Send an OpenAI-compatible request to https://getmegabrain.com/api/gateway/v1/chat/completions with "model": "mb-auto/plan" and your MegaBrain API key as a Bearer token. The official OpenAI SDKs, LangChain and any client with a base URL setting work; the same key also reaches image and video models.

**What input does Auto accept?**

It accepts Text and Images and produces Text.

**Can I try Auto before paying?**

Sign-up is free and open to everyone. Adding a card (nothing is charged) gives $1.00 of credit to try any model; after that every model is charged from a balance you top up by card.
