Skip to main content

Products

Fast Apply (Apply) — File editing model that merges partial code updates into existing files at 10,500 tok/s with 98% accuracy. Uses the <instruction>/<code>/<update> message format. WarpGrep — Code search subagent that runs in a separate context window. Explores repositories using built-in tools (grep_search, read, list_directory, glob, finish). Returns matching code snippets in ~6 seconds. Compact (Compactor) — Context compression model that removes irrelevant lines from chat history and code at 33,000 tok/s. Every surviving line is byte-for-byte identical to the original input. Router — Prompt complexity classifier that returns a model recommendation in ~430ms. Does not generate completions itself. Routes to the optimal model (e.g., claude-haiku for simple, claude-sonnet for complex).

Model IDs

ModelIDPurpose
Apply (fast)morph-v3-fastDefault file editing, highest speed
Apply (large)morph-v3-largeComplex edits requiring more reasoning
Apply (auto)autoRouter selects fast vs large automatically
WarpGrepmorph-warp-grep-v1Codebase search (local and GitHub)
Compactmorph-compactorContext compression
Embeddingmorph-embedding-v4Code and text embeddings
Rerankmorph-rerank-v4Search result reranking
Routermorph-routersPrompt complexity classification

Message Format Tags

<instruction> — XML tag in Apply messages describing what the edit does. Including it raises accuracy from 92% to 98%. <code> — XML tag containing the original file content to be edited. <update> — XML tag containing the partial edit snippet with // ... existing code ... markers for unchanged regions. // ... existing code ... — Marker placed in <update> snippets to indicate regions that should remain unchanged. Required for Apply to correctly merge partial edits. <repo_structure> — XML block in WarpGrep messages describing the repository directory layout. Required for local codebase search. <keepContext> — XML tag wrapping sections of input that Compact should never remove, regardless of relevance scoring.

API Concepts

Base URLhttps://api.morphllm.com/v1. All endpoints are OpenAI-compatible and work with any OpenAI SDK. Bearer token — Authentication method for all Morph API endpoints. Obtained from the dashboard. query parameter (Compact) — Tells Compact what information matters for the next LLM call. Without it, the model infers relevance from the last user message. code_context — Parameter in the edit_file tool definition containing the original file content to be edited. search_context — Parameter in the codebase_search tool definition containing the repository structure for WarpGrep queries.