# What is API? Also called application programming interface. An API, or application programming interface, is a defined way for one piece of software to request something from another. It specifies the available operations, the inputs each expects, the outputs it returns, and the errors it can raise, so that two systems can work together without either needing to know how the other is built. The defining property is the contract. Callers depend on the published interface rather than on internal implementation, so a provider can rewrite everything behind it as long as the contract holds. That separation is what makes large systems composable, and it is also why breaking changes are managed carefully through versioning and deprecation windows rather than shipped quietly. The term covers more than web services. A software library exposes an API in a programming language, an operating system exposes one to the applications running on it, and a web service exposes one over a network. In everyday usage today it usually means a network interface reachable over HTTP, which is what people mean when they say a product has an API. AI systems consume APIs in two directions. Models are themselves reached through one, and agents act on the world by calling other people's. Both directions raise the same practical concerns: authentication, rate limits, pagination, error handling, retries, and cost. An agent that ignores these looks fine in a demonstration and falls apart under real traffic. A common confusion is treating an API as a synonym for a product feature or a finished integration. The API is the interface, while an integration is the working connection somebody built with it. The existence of an API does not mean two systems are connected, and in practice most of the effort sits in the plumbing rather than in the interface itself. ## Key points - A published contract between two pieces of software. - Hides implementation, so providers can change internals safely. - Covers libraries and operating systems, not only web services. - Agents both call APIs and are reached through one. - An available API is not the same as a built integration. ## In practice A store's checkout page needs to charge a card. Rather than building payment processing, it sends a request to a payment provider's API containing an amount, a currency, and a token representing the card. The provider replies with a status and an identifier. The store never handles the card number, never learns how the provider talks to banks, and depends only on the documented request and response. ## Related terms - [REST API](/en/glossary/rest-api) - [SDK](/en/glossary/sdk) - [Webhook](/en/glossary/webhook) - [API Key](/en/glossary/api-key) - [Integration](/en/glossary/integration) [Back to the AI Glossary](/en/glossary)