https://api.morphllm.com/v1, and Anthropic-compatible at /v1/messages (see Endpoints).
All models support
tools, response_format (JSON mode + JSON schema), structured outputs, logprobs, and reasoning. Per-token rates are on the pricing page and live at /api/models/json.
kimi-latest always points to our newest Kimi model (today morph-kimik31) and deepseek-flash-latest to our newest DeepSeek Flash model (today morph-dsv41flash-1017). Responses report the model that answered, and usage bills at that model’s rates. Use a dated ID to stay pinned.
Quick Start
- Python
- TypeScript
- Anthropic SDK
- Claude Code
- Vercel AI SDK
- cURL
Tools and Structured Output
Tool format follows the endpoint: OpenAI function definitions on/v1/chat/completions, Anthropic tools + tool_use blocks on /v1/messages. Kimi K3 can also load tools dynamically from a contentless system message, so an agent can add schemas after searching a large tool registry without resending the full catalog on every turn.
- OpenAI
- Anthropic SDK
DeepSeek V4.1 Flash
Usemorph-dsv41flash for DeepSeek V4.1 Flash or morph-dsv41flash-1017 for the October 17 snapshot. Both IDs share a serving pool and list prices, with separate usage and customer pricing records. Both accept text and images through image_url content parts; video input is not supported.
reasoning_effort accepts low, high, xhigh, max, or an integer from 1 to 100. Omit it for the model’s default reasoning budget, or use none to disable reasoning. medium maps to high; minimal maps to low. Integer budgets belong in the OpenAI Python SDK’s extra_body, as in extra_body={"reasoning_effort": 25}.
JSON mode and JSON schema requests disable reasoning. A successful cached request reports reused input tokens in usage.prompt_tokens_details.cached_tokens; see cache pricing. Authentication failures return 401. Admission can return 429; retry with exponential backoff and respect Retry-After when present.
DeepSeek Uncensored
morph-dsv41flash-abliterated (DeepSeek V4.1 Flash Abliterated) is DeepSeek V4.1 Flash 1017 with its refusal directions ablated. It runs on its own serving pool and bills at its own rates.
Once approved, call it like morph-dsv41flash: same request format, reasoning controls, and 1M context, on /v1/chat/completions, /v1/messages, and /v1/responses.
Service Tiers
GLM-5.3 supports the OpenAIservice_tier parameter.
- A standby request is admitted only while the fleet is under roughly a quarter of its serving capacity. When no region qualifies, you get
429witherror.code: "resource_unavailable"and aRetry-Afterheader. Nothing is generated and nothing is billed. Expect most standby throughput off-peak. - On a 429, retry with exponential backoff. If you need the result now, resend with
service_tier: "default". - The response echoes the tier that served it in a
service_tierfield (on the final usage chunk when streaming). - Streaming, tools, and structured output work the same as
default. - Unknown tier values return
400listing the accepted ones.
default: under load, default requests are served in full while standby is shed in ~200ms.
Standby bills at 50% of the standard per-token rates (Standby Requests). Available on GLM-5.3 (morph-glm53-744b); sending it to other models is a no-op.
Route 5% of Production Traffic
To trial a model on a slice of real traffic, paste this into Claude Code (or any coding agent) at the root of your repo:morph-kimik3 for any model ID in the table above.
Claude Code
Claude Code speaks the Anthropic Messages API, so it runs on these models with four env vars — tools (Read, Edit, Write, Bash, Grep) go through the standardtool_use / tool_result loop:
settings.json, and MCP tools: Claude Code.
Pitfalls
Latency worse than expected
Latency worse than expected
TPS numbers are generation throughput, not end-to-end. With 30k tokens of context, prefill dominates first-token wait even with caching. For agent loops, keep a smaller working context with Compact rather than filling the full window.
Tool calls not working
Tool calls not working
On
/v1/chat/completions these models use OpenAI tool-call shape; Anthropic tool_use blocks work on /v1/messages. Match the tool format to the endpoint. Gemini functionDeclarations work on neither.JSON mode returns prose
JSON mode returns prose
Pass
response_format: { type: "json_object" } and say “respond in JSON” in your prompt. For strict shape control: response_format: { type: "json_schema", json_schema: { ... } }.See Also
- Dynamic Tool Loading — add Kimi K3 tools during a conversation
- Prompt Caching — automatic cached-input discounts, per-request TTL
- Session key — one id per conversation keeps its turns on the worker holding the cache
- Standby Requests — best-effort GLM-5.3 capacity for batch and background work
- Model Router — auto-route between these and frontier models per request
- Compact — shrink context before paying for it
- WarpGrep — code search for retrieval when context is the bottleneck
- Claude Code — run these models in Claude Code over
/v1/messages