▶ Stepthrough All tutorials Blog Glossary Prompts Videos Visual guides Start Learning Free

What is an API?

Updated · By Robert Breen

An API (application programming interface) is a set of rules and web addresses that let one piece of software ask another for data or tell it to do something. When n8n adds a row to Google Sheets or asks an OpenAI model for a reply, it's calling that service's API.

Why it matters for a small business

APIs are why automation is possible at all. Most modern business apps, from accounting to scheduling to email, offer one, so other tools can read and write their data without a person clicking around. When you compare software, "does it have an API?" is a fair question. An app without one is much harder to connect to anything else.

APIs come with rules you'll run into: a key or sign-in to prove who you are, limits on how fast you can call them, and sometimes a charge per request. The OpenAI API, for example, is billed separately from a ChatGPT subscription. Knowing that helps you read errors like "unauthorized" or "too many requests" as messages from an API, not signs that your workflow is broken.

In a real lesson: Build an Expense Reimbursement Form With AI Policy Checks

The expense reimbursement form lesson shows APIs from both sides. Maple Street Bookkeeping, the made-up bookkeeping firm in the lesson, gets an Expense Reimbursement Request form in Lovable. Its prompt tells the app to send each request as a POST request with the JSON keys name, email, expense and amount. That's the form calling n8n's webhook, which acts like a tiny API you own.

Inside the workflow, the calls go outward. The OpenAI Chat Model sends each request to OpenAI's API with your key, and the agent checks it against the policy: under $100 with a receipt is Approved, $100 or more needs a manager's OK, and no receipt means Needs receipt. Then the Google Sheets Tool and Gmail Tool call Google's APIs to save the row and email the employee.

You never see any of those calls. Each node hides its API behind dropdowns and a credential. In the test, the agent spots the missing receipt, marks the request Needs receipt and emails the employee, touching three different services in a few seconds.

Lovable prompt asking for an expense reimbursement request form for a bookkeeping firm, ready to build
Lovable prompt asking for an expense reimbursement request form for a bookkeeping firm, ready to build

Try this lesson free or read the step-by-step guide.

Common confusions

API vs webhook

With an API, your workflow asks another app for something whenever it wants. With a webhook, the other app tells your workflow the moment something happens. Many apps offer both.

API vs integration

An integration is an API someone has already wrapped in a ready-made node. If no node exists, the HTTP Request node lets you call the API directly.

API vs API key

The API is the service. An API key is the password-like code that proves you're allowed to use it and tells the service whose account to bill.

Tips

  • If you plan to automate around an app, look for its API documentation before you buy it.
  • Read API errors literally: "unauthorized" usually means a bad key, and "too many requests" means slow down.

Where you use it: free lessons

Frequently asked questions

Do I need to know how to code to use an API?
Not in n8n. App nodes call APIs for you, and even the HTTP Request node is filled in through fields rather than code. You mostly need the address, the method and a key.
Is the OpenAI API the same as ChatGPT?
No. ChatGPT is the chat app. The OpenAI API is the developer service that tools like n8n call with a key, and it's billed separately, per request.

All AI glossary terms, A to Z · Free prompt templates