Skip to main content
Running on Morph’s custom kernels and inference stack optimized for codegen. OpenAI-compatible at 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.
Pro tip: set an x-session-id header per session to optimize cache hit rate. Every turn of a conversation lands on the worker that already holds its prefix. See Session key.

Quick Start

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.
Reasoning defaults vary by model. DeepSeek V4.1 Flash enables reasoning by default; its controls are below. Reasoning tokens bill as output.

DeepSeek V4.1 Flash

Use morph-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.
Approval required. Requests from accounts without access return 403. Request access for your organization before calling this model.
Once approved, call it like morph-dsv41flash: same request format, reasoning controls, and 1M context, on /v1/chat/completions, /v1/messages, and /v1/responses.
Automatic prefix caching is on for all models, with per-request TTL control. Use Model Router to pick automatically per request.

Service Tiers

GLM-5.3 supports the OpenAI service_tier parameter.
How standby works:
  • A standby request is admitted only while the fleet is under roughly a quarter of its serving capacity. When no region qualifies, you get 429 with error.code: "resource_unavailable" and a Retry-After header. 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_tier field (on the final usage chunk when streaming).
  • Streaming, tools, and structured output work the same as default.
  • Unknown tier values return 400 listing the accepted ones.
Use standby for evals, batch labeling, data generation, and anything a retry loop can absorb. Keep interactive and agent-loop traffic on 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:
Swap 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 standard tool_use / tool_result loop:
Full setup, settings.json, and MCP tools: Claude Code.

Pitfalls

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.
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.
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