Anthropic used Claude to move its API to Rust
Messages API, from Python to Rust
Engineering
Claude wrote it · verification took longer
Written with AI assistance, reviewed by the ACN desk.
“Claude wrote a first version of the API’s core request path in about a week.”
Anthropic has moved its Messages API from Python to Rust, using Claude to write and check the new code. Anthropic’s engineering post on November 25 describes the migration and how the team verified it.
The Messages API is the main way customers reach Claude. Anthropic says traffic grew roughly 1,800 times from early 2024 to fall 2026. The company says Claude wrote a first version of the core request path in about a week. The Rust version uses about 70% less CPU per request, according to the post. Anthropic also reports a cut of about 20% in median time to first token.
Verification took most of the effort, Anthropic says. In April the Rust code passed about 98% of roughly 700 integration tests. Only about a quarter of inputs matched on production traffic at that point. An audit of the ported tests found more than 100 weakened assertions. The team then ran real requests through both versions and recorded only the shape of each difference. Claude agents investigated each kind of mismatch, and engineers reviewed the fixes. Anthropic’s chart shows the match rate reaching 99.6% by August.
TechRepublic’s report notes that the CPU figure comes from one region. It says the figures are no guarantee that another Python application will see similar gains. Public traffic moved to Rust in September 2026, according to Anthropic.
“Rust would allow us to use far less CPU per request.”
“Claude wrote a first version of the API’s core request path in about a week.”
“Verification, not generation, had become the bottleneck.”
“only about a quarter of inputs matched on production traffic”
“the company’s performance figures aren’t a guarantee that another Python application will see similar gains”
Sponsor
Spot an error? Email corrections@aicodingnews.si. Fixes are logged on the corrections page.
Sponsor
Sponsor
Messages API, from Python to Rust
Nitro v7 keeps customer data from Anthropic and AWS
AWS AI Factories, plus managed agents on Bedrock
Anthropic blames overcaution on long tasks
Sponsor
Sponsor