MisarCoder API Documentation
An OpenAI- and Anthropic-compatible inference gateway. Point your existing SDK at MisarCoder and route through a cascading multi-model MoE engine.
MisarCoder is an inference gateway that speaks both the OpenAI (/v1/chat/completions) and Anthropic (/v1/messages) wire formats, backed by a cascading multi-model router. Point any OpenAI- or Anthropic-compatible SDK at the gateway and authenticate with Authorization: Bearer <API_KEY>. Gateway base URL: https://api.misar.dev.
MisarCoder lets your existing tooling — the OpenAI SDK, the Anthropic SDK, curl, or Claude Code via ANTHROPIC_BASE_URL — talk to a self-hosted mixture-of-experts router without code changes. It also exposes a Server-Sent-Events research agent, an A2A (Agent-to-Agent) discovery surface, and management endpoints for connected MCP servers.
Quickstart
Make your first request with the OpenAI SDK in under 5 minutes
API Reference
Chat completions, Anthropic messages, agent streaming, models, and A2A
Authentication
How to authenticate requests against the gateway
MCP Tools
Use misarcoder_ask and misarcoder_complete from an MCP client
Why MisarCoder?
Drop-in Compatible
Works with the stock OpenAI and Anthropic SDKs — only the base URL changes.
Cascading MoE Router
Requests route across a multi-model mixture-of-experts engine with automatic fallback.
Anthropic Passthrough
claude-* models stream straight through to Anthropic, preserving cache_control.
Reasoning Effort
An OpenAI-style reasoning_effort knob, auto-derived when unset.
Research Agent
A streaming SSE research pipeline (plan → search → reflect → synthesize).
A2A Discovery
Publishes an Agent-to-Agent v1.0 agent card and task lifecycle endpoints.
Quick Example
curl https://api.misar.dev/v1/chat/completions \
-H "Authorization: Bearer $MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3:8b",
"messages": [{ "role": "user", "content": "Write a haiku about caching." }]
}'Base URL
The gateway is served directly at https://api.misar.dev. Within the Misar API topology the canonical public proxy is https://api.misar.io/coder/* — use api.misar.dev for the raw gateway paths documented here.
Endpoint prefixes
OpenAI-compatible routes are mounted at /v1/*, Anthropic at /v1/messages, the research agent at /api/v1/agent/stream, and A2A discovery at /.well-known/a2a-agent-card.