Inference
A Claude API feature where the model writes Python code that calls your tools as functions inside a code execution container, instead of making one model round trip per tool call.
A Claude API feature where the model writes Python code that calls your tools as functions inside a code execution container, instead of making one model round trip per tool call. When the code calls a tool, execution pauses, your app returns the result, and the code continues; only the final output enters Claude's context, not the intermediate results. You opt a tool in by adding code execution to its allowed_callers field. It reduces latency and token use in workflows that loop over many calls or filter large results.
Primary source: platform.claude.com
Example
In practice, developers reach for Programmatic Tool Calling when they need the capability described above as part of an AI feature or workflow.
Hands-on guides, comparisons, and tutorials that cover Inference.
FAQ
A Claude API feature where the model writes Python code that calls your tools as functions inside a code execution container, instead of making one model round trip per tool call.
Programmatic Tool Calling sits in the Inference part of the AI stack. Understanding it helps you make better decisions when building, debugging, and shipping AI features.
Developers Digest publishes tutorials and videos that cover Inference topics including Programmatic Tool Calling. Check the blog and YouTube channel for hands-on walkthroughs.
Related
The first and most expensive stage of building a language model, where it learns to predict the next token across a huge unlabeled corpus of web text, books, and code.
The split pricing model where LLM APIs charge one rate per million tokens you send (input) and a higher rate per million tokens the model generates (output).
An inference technique where a small, fast draft model proposes several tokens ahead and the large target model checks them all in one parallel forward pass.

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.