Skip to content
LiveNext 06:35:47

Definition

What is API?

API is an API (application programming interface) is a defined way for one piece of software to ask another for data or actions, such as an app sending a prompt to an AI model and getting a reply.

What it is

An API, or application programming interface, is a set of rules that lets one program talk to another. One side publishes what requests it accepts and what answers it returns. The other side follows those rules. Neither needs to know how the other works inside.

An analogy: an API is a restaurant menu and a waiter. You do not walk into the kitchen. You order from the menu, and the waiter brings back what you asked for.

How it works

Most web APIs work over the internet. Your software sends a request to an address, usually with some data attached, and the service sends a response, often in a format called JSON. A request names what you want, such as "generate text from this prompt," and includes proof of who you are, commonly an API key or an access token.

APIs and AI

Nearly every AI model is available through an API. A developer sends a prompt and settings such as temperature or a system prompt, and the model returns text, an image or a structured output. Billing is usually by tokens processed, which makes the API the place where cost, rate limits and latency become concrete.

Because so many services copy the same request format, an OpenAI-compatible API lets an app switch models by changing an address and a key. APIs are also how tool use works: when an AI agent books a meeting or searches a database, it is calling someone else's API. Standards like the Model Context Protocol exist to make those connections more uniform.

Why it matters

APIs are where products get built, and also where they get attacked. An exposed or poorly protected API can leak data, so it should require authentication, limit request rates and validate every input. Weaknesses such as SQL injection and SSRF often arrive through an API endpoint nobody watches closely.

What to remember

An API is a contract. When it changes, everything built on it can break, so providers announce versions and deprecations ahead of time. If you build on an AI model, read its API documentation first, and keep your keys out of public code.

Questions people ask

What is an AI API?

A way for software to send a prompt to an AI model over the internet and receive its response, usually billed by tokens.

API in the news

#01

OpenAI will watermark ChatGPT text written in the EU

OpenAI said Monday it will add an invisible watermark to eligible ChatGPT and Codex text generated in the EU over the coming weeks, and API customers anywhere can now opt in. It is a compliance signal, not a lie detector, and OpenAI says so itself.

#03

Mistral prices a full voice agent at $0.04 a minute

Mistral released Voxtral 3 on Oct. 20: new transcription and speech models plus a voice agent API at $0.04 a minute when it reasons with Mistral Small 4. Skip the benchmark charts. The per-minute price and the choice of where audio is processed are the story.