curl -X POST "https://api.morphllm.com/v1/compact" \Morph Compact
Blazing Fast Compaction
An LLM context compression API: shrink context 50-70% at 33,000 tok/s while keeping every surviving sentence verbatim, for $0.20/M input and $0.50/M output. Your agents run for hours, not minutes.

Try it out
Paste context. See it shrink.
Context
Diff
Diff appears here after compaction
3 free compactions remaining
LLM context compression API
One POST to /v1/compact with your text or messages. Every surviving line comes back verbatim from the input.
01
02
-H "Authorization: Bearer YOUR_API_KEY" \03
-H "Content-Type: application/json" \04
-d '{05
"input": "...full agent conversation or tool output...",06
"query": "fix the rate limiting bug",07
"compression_ratio": 0.508
}'Morph Compact
Compaction that actually
improves performance
Compaction, not summarization
Summarization rewrites your context. Factory's eval scored it 3.4-3.7/5 on accuracy. Compact deletes filler and keeps every surviving sentence word-for-word.
Under 3 seconds at 33,000 tok/s
Custom inference engine. Fast enough to run inline before every LLM call, not just at the 95% capacity cliff.

Works with web search
Agents running web searches pull back 10k+ tokens per page. Compact shrinks search results to the signal in under 300ms, so downstream models stay fast and don't lose the thread.

Enable 24+ hour agent sessions
1.5 min vs 2.5s compaction
