What does API mean?
An Application Programming Interface (API) is a software intermediary that allows two separate applications to talk to each other. It defines the exact types of requests that can be made, how to make them, and the strict data formats that must be used.
What is a simple example?
Imagine sitting at a restaurant with a menu. The kitchen is the system that prepares the order. The waiter is the API. You tell the waiter what you want (the request), the waiter communicates it to the kitchen using their internal shorthand, and the waiter brings the food back to you (the response). You never have to step into the kitchen yourself.
How does it relate to AI?
Language models are inherently isolated; they only know what they were trained on. For an AI agent to take action in the real world—like sending a Slack message, checking the weather, or reading a database—it must communicate through an API. Techniques like function calling were invented specifically to bridge the gap between AI models and traditional APIs.