Decoder. plain-English AI glossary

function calling API

● Corefunction calling API

An API feature that lets you define functions (tools), and the model decides when and how to call them with structured arguments.

Think of it like

Giving the model a menu of abilities—it looks at the request and picks which ability to use.

Example

Define functions: 'get_weather(city)' and 'search_flights(from, to, date)'. User asks 'flights to LA next week.' Model returns JSON: {function: 'search_flights', args: {from: 'NYC', to: 'LA', date: ...}}.

How it actually works

Function calling is how agents work at scale. Instead of prompting the model to generate command text, it returns structured JSON that names the function and arguments. Reduced hallucination, easier parsing, composable. All major APIs now support it.

For product teams

Enables reliable agent workflows; reduces parsing errors and cost from retries.

For engineers

Structured output; LLM returns function name and JSON args, not free text.

Read anything AI without the jargon

Look up any term in plain English, or save terms as you read with the free Chrome extension.

Open DecoderAdd to Chrome