Glossary
AI API glossary
The words you meet when you call AI models through an API. Each is defined in a sentence or two, then explained: how the makers' APIs handle it, and how it works on /model.
Basics
What a model reads and writes, and how it is measured.
AI API
An AI API is a web interface that lets a program send input, such as a prompt, to a hosted AI model and get the model's output back, usually as JSON over HTTPS, paid for per token.
Context window
A context window is the most tokens a language model can work with in one request: the prompt, the conversation so far and the answer it writes. Text beyond it can't be sent in that request.
Embeddings
An embedding is a list of numbers, a vector, that stands for a piece of text so that texts with related meanings get vectors close together. Search, recommendations and retrieval for chat apps are built on them.
Max tokens
Max tokens is a request parameter that caps how many tokens a model may write in one answer. When the answer reaches the cap, the model stops, even in the middle of a sentence.
Model ID
A model ID is the exact string an API request uses to choose its model, such as claude-opus-5-5. An alias is a shorter name that points at a model ID and can move to a newer model.
Multimodal input
Multimodal input is input to an AI model in more than one form, such as text together with images, documents or audio. A model with vision can read images and answer questions about them.
Reasoning tokens
Reasoning tokens are the tokens a model generates while it thinks through a problem, before it writes its answer. They are billed as output tokens, even when the API doesn't return their text.
Token
A token is the unit of text a language model reads and writes: a word, part of a word or a punctuation mark. AI APIs measure prompts, answers, limits and prices in tokens.
APIs and setup
The formats apps call, and what a call needs: a base URL, a key and a model ID.
Anthropic Messages API
The Messages API is Anthropic's API for Claude models: a request sends a model ID, a token limit and a list of user and assistant messages, and the answer is a list of content blocks.
API key
An API key is a secret string a program sends with each request to prove which account is calling. The API uses it to authorize the request and to bill that account for it.
Base URL
A base URL is the root address an SDK or app sends its API requests to; each endpoint's path is added to it. Changing it points the same code at a different compatible API.
Chat Completions API
The Chat Completions API is OpenAI's API for chat models: a request sends a list of messages, each with a role, and the answer is the model's next message. Most AI tools speak its format.
OpenAI-compatible API
An OpenAI-compatible API accepts requests and returns answers in the same format as OpenAI's API, so code written for OpenAI works with it after changing the base URL, the API key and the model ID.
Responses API
The Responses API is OpenAI's newer API for generating model output, which OpenAI calls an evolution of Chat Completions. A request takes input and instructions, and the answer is a list of typed output items.
System prompt
A system prompt is the set of instructions an app gives a model for a whole conversation, kept apart from the user's messages: the model's role, its rules, its tone and the context it needs.
Features
What you can ask a model for beyond plain text.
Function calling
Function calling is a model's ability to answer with a request to run one of the functions an app described, with arguments, instead of with text. The app runs the function and sends the result back.
Prompt caching
Prompt caching is an API feature that keeps the start of a prompt after one request, so the next request that begins with exactly the same text reads it from the cache, faster and at a lower price.
Streaming
Streaming is a way of receiving a model's answer while it is being written, in small pieces sent as server-sent events, rather than as one response once the whole answer is finished.
Structured outputs
Structured outputs is an API feature that makes a model answer with JSON matching a schema the request supplies, so the answer can be parsed without checking for missing fields or invalid values.
Limits and errors
What stops a request, and what to do about it.
Overloaded error (529)
An overloaded error is an API's answer when it is too busy to serve a request right now, whoever sent it. Anthropic's API returns it as status 529, with the type overloaded_error.
Rate limit
A rate limit is a cap on how much an account may send to an API in a period, counted in requests or tokens per minute. Past it, the API answers 429 Too Many Requests.
Time to first token
Time to first token, or TTFT, is the time from sending a request to receiving the first token of the model's answer. It is the wait a user sees before text starts to appear.
Billing and routing
How calls are paid for, and how a gateway picks who serves them.
AI gateway
An AI gateway is a service between apps and AI model providers that gives them one endpoint and one set of keys for many models, and handles routing, spending limits and usage tracking in one place.
API credits
API credits are a prepaid balance that an AI API charges each call against. You buy them before you use the API, and requests stop when the balance runs out, until you add more.
LLM router
An LLM router is the part of an AI system that decides, request by request, which model or provider serves a call, by rules such as price, speed, success rate or task, and can retry elsewhere when one fails.
Token pricing
Token pricing is how AI APIs charge for their models: a price per million input tokens and another per million output tokens, so each call costs what it reads and writes.
One key for every model here.
Top up from $10, change one URL, and pay only for the tokens you use.