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.io/coder.
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.io/coder/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's canonical public URL is https://api.misar.io/coder/* — use it for every path documented here.
The legacy host api.misar.dev still serves the same gateway and will keep working, so existing clients and older SDK versions are unaffected. Prefer api.misar.io/coder for anything new.
Not to be confused with the offline coding API, which is a separate, self-hosted service at https://api.misar.io/coder/offline.
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.