Anthropic disclosed on Nov. 25 in an engineering blog post how it moved its Message API, a main channel for customers and Anthropic apps such as Claude Code and Cowork to access Claude, from Python to Rust.
According to Anthropic, the new Rust-based API cut CPU usage per request by about 70 percent. It also reduced the median time to first token by 20 percent.
Anthropic said it completed the transition without stopping its service.
Anthropic cited a surge in traffic as the reason for the switch to Rust. API traffic increased about 1,800-fold from early 2024 to autumn 2026.
The API goes through multiple steps for each request, including verification, prompt conversion and safety checks. The company said Python used more computing resources at each step.
Anthropic said it initially rewrote only the slow parts in Rust, cutting CPU usage by 8 to 10 percent, but a new burden emerged as a token moved between the two languages. It then decided to rewrite the whole system.