API (Application Programming Interface)
An API (Application Programming Interface) is a defined set of rules through which one piece of software requests data or actions from another.
An API is a contract between two pieces of software. It names the operations one side offers, the inputs each operation takes, and the results it returns. The caller depends only on this contract, not on how the other side works inside. The term covers library interfaces inside one program as well as services reached over a network.
An API hides the internal details of a system behind a stable surface. The provider can change its code freely, as long as the contract stays the same. Web APIs usually carry requests and responses over HTTP, often as JSON. Common styles include REST, GraphQL, gRPC and the older SOAP. Most web APIs also require authentication, such as an API key or a token.
APIs connect most modern software, from mobile apps to cloud services. Cloud providers expose their resources through APIs, so programs can create, start and delete machines without a person in the loop. Software development kits and command-line tools are usually thin layers over such an API. AI agents also act through APIs, calling them as tools to read data or change systems.