close
Skip to main content
Base URL https://api.morphllm.com. One API key, two wire formats: Docs examples use OpenAI-SDK tabs. For any open-source chat model, the Anthropic Messages API works equivalently: same models, same per-token billing, same rate limits. Specialized model APIs (Fast Apply, WarpGrep, Compact, Reflex) are OpenAI-format only. Auth accepts both conventions: Authorization: Bearer YOUR_API_KEY or x-api-key: YOUR_API_KEY.
Streaming, tools (tool_use / tool_result blocks), system prompts, and multi-turn history all work as the Anthropic API documents them. Model reasoning surfaces as thinking content blocks; a thinking request config maps to the models’ reasoning effort tiers (budgets under 8k → low, under 24k → medium, above → high). This is what makes Claude Code work natively with Morph models: point ANTHROPIC_BASE_URL at https://api.morphllm.com and go.

Claude Code

Everything Claude Code sends works on this endpoint: tool use, streaming, system params, multi-turn tool_result history. Verified against Claude Code v2.1.
The endpoint does not yet accept {"role": "system"} entries inside the messages array (Anthropic’s API folds them into the system prompt; we currently 400 with invalid message role: 'system'). Use the top-level system param instead. Claude Code itself only sends the top-level form, so the direct setup above works out of the box. If you wrap Claude Code behind a proxy that injects system messages, rewrite those entries to user until the server-side fix ships.