Skip to main content
Early access — new tools and guides added regularly
Practical

API (Application Programming Interface)

Last reviewed: April 2026

A way for software to communicate with other software. APIs are how developers connect AI capabilities to websites, apps, and business tools.

An API — Application Programming Interface — is a set of rules that lets one piece of software talk to another. It is the mechanism that allows developers to connect AI capabilities to websites, mobile apps, business tools, and custom workflows.

When you use ChatGPT through its website, you are interacting through a user interface. When a developer integrates ChatGPT's capabilities into their own application — say, adding AI-powered search to an e-commerce site — they use OpenAI's API.

The restaurant analogy

Think of an API like a restaurant:

  • The menu is the API documentation — it tells you what is available and how to order it.
  • Your order is the API request — you specify what you want (a prompt, a model, parameters).
  • The kitchen is the AI model — it processes your order.
  • Your meal is the API response — the result delivered back to you.

You do not need to know how the kitchen works. You just need to know how to read the menu and place an order.

How AI APIs work

Most AI APIs follow a simple pattern:

  1. Authentication: You get an API key (like a password) from the AI provider.
  2. Request: Your application sends a request containing the prompt, model choice, and parameters (temperature, max tokens, etc.).
  3. Processing: The AI provider's servers run inference on your prompt using the specified model.
  4. Response: The AI's output is returned to your application as structured data (usually JSON).

A simplified API call to generate text might look like:

Send to: api.anthropic.com/v1/messages Include: your API key, model name, your prompt Receive: the AI's response, token count, and metadata

Why APIs matter for business

APIs transform AI from a standalone tool into an integrated capability:

  • Custom applications: Build AI features into your own products without building an AI model
  • Automation: Connect AI to your existing workflows — CRM, email, project management
  • Scale: Process thousands of requests programmatically instead of one at a time through a chat interface
  • Customisation: Control every parameter — model, temperature, system prompt, max length — for each use case
  • Data control: Keep sensitive data within your own systems rather than pasting it into third-party interfaces

API pricing

AI APIs typically charge per token:

  • Input tokens: The cost of processing your prompt
  • Output tokens: The cost of generating the response (usually more expensive)
  • Prices are quoted per million tokens and vary by model
  • More capable models cost more per token

This pay-per-use model means you only pay for what you use, making it cost-effective to start small and scale as needed.

REST APIs vs SDKs

  • REST APIs are the raw interface — you send HTTP requests and receive responses. Any programming language that can make web requests can use a REST API.
  • SDKs (Software Development Kits) are pre-built libraries in specific programming languages (Python, JavaScript, etc.) that make it easier to work with the API. They handle authentication, error handling, and data formatting for you.

Most AI providers offer both. SDKs are simpler for developers; REST APIs provide maximum flexibility.

No-code and low-code API access

You do not need to be a developer to benefit from APIs. Tools like Make, Zapier, and n8n provide visual interfaces for connecting AI APIs to your business tools. You can build workflows like "When a new support ticket arrives, use Claude's API to draft a response, then send it to my team in Slack for review" — without writing code.

Want to go deeper?
This topic is covered in our Practitioner level. Unlock all 52 lessons free.

Why This Matters

APIs are how AI moves from being a chat tool to being embedded in your business processes. Understanding what APIs are — even at a high level — helps you participate in conversations about AI integration, evaluate build-vs-buy decisions, and understand the cost structure of AI-powered features. You do not need to write API code yourself, but knowing that APIs exist and what they enable helps you recognise opportunities to automate and scale AI across your organisation.

Related Terms

Learn More

Continue learning in Practitioner

This topic is covered in our lesson: Building Your First Reusable Template