What is an API?

API stands for Application Programming Interface. The long name hides a simple idea: an API is a way for one program to ask another program to do something, without a human clicking through menus in the middle.

Think of it like the order window at a drive-through. You don’t walk into the kitchen and cook your own burger — you pull up to a window with a clear menu, ask for what you want in the format the staff understands, and they hand the result back through the same window. The window is the API. It’s the agreed-upon spot where one side makes requests and the other side fulfils them.

Why APIs matter

Almost every tool you use online has an API somewhere underneath it. When the website you’re looking at refreshes part of the page without reloading, it’s quietly calling an API behind the scenes. When two apps “connect” — like a Google Calendar event showing up in Slack — they’re talking to each other through APIs.

For people doing real work with AI, an API is what turns a single-session chat into something repeatable. Instead of pasting a prompt into a window every time, you can write a short script that asks the AI the same kind of question for ten different inputs in a row. That’s the move from “tool I use” to “tool that works for me while I do something else.”

When you’ll hear about APIs

  • “OpenAI has an API.” Meaning: you can program against ChatGPT, not just chat in a browser.
  • “There’s no public API for X.” Meaning: the makers haven’t given outsiders a tidy way to ask their tool to do things. (NotebookLM is a famous example — see the unofficial workaround.)
  • “API key.” A password-like credential that proves you’re allowed to make requests. Treat it like a house key: don’t paste it into screenshots, don’t commit it to GitHub.
  • “Hitting the API.” Slang for “calling the API to do something.” It just means a program made a request.

API vs. CLI vs. MCP

You’ll see these three side by side. They’re related but not the same:

  • API — the underlying interface a program exposes for other programs.
  • CLI — a command-line tool you type into the Terminal. Often a CLI is a friendly wrapper around an API.
  • MCP — a newer protocol designed for AI agents to call tools and APIs in a standard way.

Related

Get Smarter About AI Every Morning

Free daily newsletter — one story, one tool, one tip. Plain English, no jargon.

Free forever. Unsubscribe anytime.

Two ways to go further

The AI Prompt Library

1,000+ ready-to-use prompts for Claude, ChatGPT, and Gemini. Stop staring at a blank box.

Get it for $39 →

2-Hour Live AI Crash Course

A private, beginner-friendly session across Claude, ChatGPT, Gemini, and the wider landscape.

Book for $125 →

Discover more from Beginners in AI

Subscribe now to keep reading and get access to the full archive.

Continue reading