Term explained
What is an API (and an API key)?
An API is a way for one piece of software to ask another for something, such as an app asking an AI model for an answer. An API key is the password that proves who is asking.
In plain English
API stands for application programming interface. It is a set of agreed requests one program can send to another, a bit like a restaurant menu: you don’t go into the kitchen, you order from the menu and the food comes out. A weather app uses a weather service’s API to fetch the forecast; a travel site uses airlines’ APIs to show flight prices.
In AI, most apps don’t run their own model. They send your question to a model from a company such as OpenAI, Anthropic or Google through its API, and show you the answer. The company charges the app for each request.
An API key is a long secret code that identifies who is making the request, so the provider knows whom to bill. It works like a password and a credit card in one.
Why it matters
APIs are how AI gets built into everyday products, from email apps to customer-service bots. They are also why a small team, or one person, can build an AI product without training a model of their own.
An example
A small business builds a website that writes product descriptions. When a user clicks “Write”, the site sends the product details to an AI model’s API along with the business’s API key, gets the text back and shows it. The AI company bills the business for each description.
What to watch out for
An API key must stay secret. If it ends up in code that runs in people’s browsers, or in a public code repository, anyone can find it and run up huge bills on your account. This is one of the most common mistakes in vibe-coded apps; see the cases in our Built with AI guide.