AIToday
Large Language ModelsAI Business & IndustryAI Coding AssistantsGIGAZINE AIPublished: Nov 26, 2026, 13:00 JST

Anthropic ports Messages API to Rust with Claude, cutting CPU 70%

Send on LINE
Anthropic ports Messages API to Rust with Claude, cutting CPU 70%

3 Key Points

  1. What happened

    Anthropic said it used Claude to fully port its Messages API from Python to Rust, moving over in September 2026 without downtime. CPU use per request fell about 70%, memory per request fell over 80%, and median time for Claude Code users to get a first token dropped about 20%.

  2. Why it matters

    The company reports that its Messages API now runs on Rust at the same scale as before, with lower resource use per request and faster first responses for Claude Code users.

WHO IT HITSBackend and platform engineers running high-traffic APIs may look to Anthropic's account as a case study for using AI assistants to rewrite code while verifying behavior against live traffic.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

Anthropic first tried rewriting only the most CPU-intensive parts of the Messages API in Rust. That approach cut CPU use by about 8–10%, but it added data-passing between Python and Rust and made the system more complex, according to the company. Anthropic then chose a full port, and Claude produced an initial version of the core API in about a week.

Verification became the hard part. In April 2026, the Rust version passed about 98% of tests, yet when checked against real requests it matched the Python version on only about a quarter of input-processing results. Claude's ported tests had also loosened pass conditions in more than 100 places. Anthropic responded by treating the live Python API as the reference, running the model only once per request, and logging where outputs diverged without reading request or response content.

The company grouped similar defects and assigned fixes to Claude agents, with engineers approving proposed changes before validation against real traffic. Anthropic says this shifted the bottleneck in large software projects from writing code toward verification.

FAQ
What results did Anthropic report from the Rust migration?
Anthropic reported about 70% less CPU per request in measured regions, over 80% less memory per request service-wide, and about 20% shorter median time for Claude Code users to receive a first token.
How did Anthropic verify the Rust version behaved like the Python one?
It used the running Python API as a reference, sent the same requests to the Rust version, ran the model only once per request, and compared results at each processing stage while logging only differences and data lengths.
When did the switch to Rust happen?
Anthropic moved the Messages API to Rust in September 2026 without stopping the service.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleTherapist: Clinicians Dismiss AI as 'Hype Bubble' at Their Peril