Quickstart
Make your first MisarCoder request with the OpenAI SDK, the Anthropic SDK, or curl.
Because MisarCoder is wire-compatible with both OpenAI and Anthropic, getting started means changing a base URL and nothing else.
1. Point your SDK at the gateway
from openai import OpenAI
client = OpenAI(
base_url="https://api.misar.dev/v1",
api_key="YOUR_MISARCODER_API_KEY",
)
resp = client.chat.completions.create(
model="qwen3:8b",
messages=[{"role": "user", "content": "Explain MoE routing in one sentence."}],
)
print(resp.choices[0].message.content)Set ANTHROPIC_BASE_URL so Claude Code (or the Anthropic SDK) routes through MisarCoder:
export ANTHROPIC_BASE_URL="https://api.misar.dev"
export ANTHROPIC_API_KEY="YOUR_MISARCODER_API_KEY"from anthropic import Anthropic
client = Anthropic(base_url="https://api.misar.dev", api_key="YOUR_MISARCODER_API_KEY")
msg = client.messages.create(
model="qwen3:8b",
max_tokens=1024,
messages=[{"role": "user", "content": "Explain MoE routing in one sentence."}],
)
print(msg.content[0].text)curl https://api.misar.dev/v1/chat/completions \
-H "Authorization: Bearer YOUR_MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3:8b",
"messages": [{ "role": "user", "content": "Explain MoE routing in one sentence." }]
}'2. Stream the response
Set stream: true to receive OpenAI-style text/event-stream chunks terminated by data: [DONE].
curl https://api.misar.dev/v1/chat/completions \
-H "Authorization: Bearer YOUR_MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "qwen3:8b", "stream": true, "messages": [{ "role": "user", "content": "Count to 5." }] }'3. List available models
curl https://api.misar.dev/models \
-H "Authorization: Bearer YOUR_MISARCODER_API_KEY"