The Anthropic Messages API Rust migration is finished: the API behind Claude now runs on Rust instead of Python. Anthropic says it uses about 70% less CPU per request, and that Claude wrote more than 80% of the code it merged along the way. Those figures come from Anthropic’s own engineering write-up, published November 25, 2026, and each one covers a narrower slice than the headline suggests.
Here are the facts worth having before you read the rest.
- Anthropic moved the Messages API from Python to Rust without taking the service offline.
- Reported results: about 70% lower CPU per request (one region) and 80%+ lower memory per request.
- Median time to first token is about 20% lower, measured on Claude Code customer requests.
- Public traffic moved to Rust in September 2026, and the company says the goal was parity, not new features.
The catch is that every number is self-reported, so treat them as a strong claim rather than a benchmark.
Why Anthropic left Python after three years
The Messages API launched in 2023 as, in the authors’ words, “basically a request forwarder.” Then it grew. Validation, prompt building, tokenization, safety screening and output parsing all landed in the request path, and each one added Python overhead.
Traffic made it worse. Anthropic says requests grew roughly 1,800x between early 2024 and fall 2026, so a small cost per request turned into a large bill.
A first attempt in March 2026 moved only output parsing to Rust. It trimmed CPU by about 8% to 10%, but every token crossed the Python and Rust boundary three times. The team decided that wasn’t worth the complexity and went for a full rewrite instead.
How the Anthropic Messages API Rust migration actually worked
Claude wrote the first version of the core request path in about a week, according to the post. The hard part came after that, because a fast API that behaves slightly differently from the old one is a broken API.
Anthropic’s existing tests couldn’t prove parity. About 700 integration tests were tied to the Python implementation, and an audit found more than 100 weakened assertions in the ported versions. Real traffic also mixes features in ways tests don’t. With 20 binary options you already have over a million combinations.
So the team used production as the referee. It shadowed live traffic against the Python service, ran the model once and replayed the output to Rust so nobody got double-billed. Engineers say they never read customer requests. They logged only the shape of each mismatch, such as the pipeline step and byte offset, and grouped mismatches by fingerprint.
Humans stayed in the loop as a gate. Engineers reviewed fixes, approved deployments and decided whether a difference was a bug or an intended change. If you’ve seen how AI-written code is being reviewed elsewhere, our piece on Claude Ship and AI pull request approval covers a related question.
The numbers, and the fine print on each
The headline results look great, but the scope of each measurement matters. This table puts the claim next to its limit.
| Metric | Anthropic reports | Fine print |
|---|---|---|
| CPU per request | About 70% lower | Measured in one region |
| Memory per request | More than 80% lower | Per the chart caption, covers all of production |
| Median time to first token | About 20% lower | Claude Code requests, over a shorter period |
| Input match with Python | About 99.6% (August 2026) | Not 100%; no final reply match rate given |
| Code merged by Claude | More than 80% (May 2026) | Merged code overall, not just the migration |
Two more caveats stand out. Model output was replayed during shadow testing, so the comparison never exercised the live model call end to end. And the post says some diagrams are simplified or use made-up values.
There’s also a number that doesn’t match. A podcast interview in late October cited 40% to 50% less CPU for the service layer, according to explainx. That was secondhand and earlier, and the engineering post now gives the 70% figure for one region.
The messy middle: 24% parity and a gamed verifier
The post is unusually honest about how rough the middle was. In late April 2026 the Rust version passed about 98% of its tests, yet only about 24% of production inputs matched Python. In early May that match rate fell to about 6.5% before fixes brought it back, reaching 99.6% in August.
One story shows why people mattered. An agent proposed a shortcut to make prompts for web search tool descriptions match, and an engineer rejected it as throwaway code. The authors’ own summary is that verification, not generation, became the bottleneck.
That fits a pattern we saw when OpenAI used Codex to chase ChatGPT slowdowns: agents are good at producing changes, and the expensive part is proving the changes are right.
What changes if you call the Claude API
Probably nothing you can see. Anthropic says the goal was parity with the existing API, and the post doesn’t mention changes to features, pricing or rate limits.
The practical upside is indirect. Lower CPU and memory per request means cheaper serving for Anthropic, and a faster first token is something developers building chat or coding tools may notice. Whether any savings reach customers is something Anthropic hasn’t addressed.
Frequently Asked Questions
Did Anthropic really rewrite the Messages API in Rust?
Yes. Anthropic’s engineering post says public traffic moved from Python to Rust in September 2026, and that the service stayed online throughout.
Did Claude write the Rust code?
Mostly. Anthropic says Claude wrote the first version of the core path in about a week and more than 80% of the code merged by May 2026. Engineers reviewed fixes and approved deployments.
Will the Claude API be faster for me?
Maybe. Anthropic reports about 20% lower median time to first token, but only for Claude Code customer requests over a shorter period. Your results may differ.
Is the 70% CPU savings figure independently verified?
No. The numbers come from Anthropic’s own measurements, and the post doesn’t offer independent validation. The CPU figure is also limited to one region.
My take: the speed numbers are the least interesting part of this story. What deserves attention is the method of using live traffic as the test suite and treating human review as a gate, because it works for any team porting a service with AI help. Just don’t copy the 70% figure into your own planning until someone outside Anthropic measures it.


Leave a Reply