AI Build South Africa
A fundamentals guide, written for someone whose AI agent writes the actual API calls, not someone learning to write them by hand.

Quick answer

An API (Application Programming Interface) is a fixed, agreed-upon way for one piece of software to ask another piece of software to do something or hand over information: confirm a payment, send a WhatsApp message, return today's exchange rate. You'll rarely write the actual request yourself if you're building with Lovable, Base44, Bolt.new or Claude Artifacts, your AI agent writes that code for you, but you'll see the term constantly: in error messages, in a platform's own docs, in an "API key" field you're asked to paste into a secrets panel.

What an API actually is, without the jargon

Strip away the acronym and an API is a contract: a fixed set of rules two pieces of software agree to follow so they can talk to each other reliably. One side sends a request in a specific, expected shape, the other side sends back a response in a specific, expected shape, and neither side needs to know anything about how the other one actually works internally. PayFast doesn't need to know your app is built in Lovable. Your app doesn't need to know how PayFast processes a card. Both sides just need to follow the agreed rules for asking and answering.

That's the whole idea. Every other detail, REST versus other technical styles, specific request formats, is implementation detail that matters to whoever is writing the request. On an AI-built site, that's your AI agent, not you.

You don't write the API call, your AI agent does

This is the part that changes for a vibe coder specifically. A traditional developer learning to use an API spends real time reading its documentation and writing the request by hand. When you ask Lovable, Base44, Bolt.new or Claude Artifacts to "connect PayFast" or "send a WhatsApp message when someone submits the form," the agent reads the platform's documentation itself and writes the actual request code, the same kind of code a developer would write by hand. Your job shifts from writing the call to describing what you want clearly enough that the agent builds the right one, and to recognising the vocabulary well enough to understand what's happening when something goes wrong.

A website vs. an API

A website

Built for a person, in a browser:

Layout, images, buttons, a visible page

An API

Built for one program to talk to another:

No visual page at all, just structured data in and out

AI Build · aibuild.co.za

Where you'll actually run into this term on your own build

A handful of words show up constantly once an AI-built project starts talking to the outside world, and they're worth recognising rather than treating as unfamiliar jargon each time. An endpoint is the specific address a request gets sent to, PayFast's checkout endpoint is a different address from its webhook endpoint, even though both belong to the same API. A request is what your app sends; a response is what comes back. An API key (sometimes called a secret, a token or an access token depending on the platform) identifies your account to the service you're calling. A rate limit caps how many requests you're allowed to send in a given period, which is why a sudden flood of activity can start failing even though nothing about your code changed.

Every payment gateway, email service or messaging service you connect is an example of exactly this: a specific API, with its own address, its own request shape and its own key, wrapped in the same underlying pattern.

The one safety rule that actually matters: API keys are secrets

An API key proves you're allowed to make a request, sometimes on your account, sometimes with money attached. Anyone who gets hold of a live key can act as if they were you: sending messages on your account, or in a payment integration's case, potentially forging a request that looks legitimate. This is exactly why a key belongs as a secret in a backend function rather than in code the browser can read, and why a key pasted directly into frontend code is visible to anyone who opens their browser's developer tools, no special skill required. Keeping a key server-side isn't extra caution for a nervous developer; it's the one non-negotiable rule that makes the rest of an API integration actually safe to ship.

Not every API behaves the same way

Two APIs that look similar on the surface can differ in ways that matter once real usage starts. Some are free to call, some charge for each request, and some, like payment providers, charge for each transaction instead of each call. Some need nothing more than an account; others ask you to go through a verification process before you can use them for real. A provider can also change its API over time, adding a required field or retiring an old version, sometimes with little warning. So before you trust any guide's details about a specific API, check them against the provider's own current documentation, or ask your AI to.

What is an AI API?

An AI API is an ordinary API whose answers are written by an AI model. Your app sends it a request, such as a question, and it sends back what an AI model wrote. It works like any other API, with a key, a request and a response. What's different is that the answer can change each time.

That last part matters when you build with one. Ask the same question twice and you can get two different answers, so your app has to cope with replies it didn't expect, and anything important in them is worth a check before it's shown to a visitor. The key follows the same rule as every other secret: it lives in your backend, never in the page (why an API key can't go in the frontend). The AI chat assistant you use and an AI API can run on the same model; the API is simply how an app reaches that model without a chat window.

Where to go next

Not affiliated with the platforms we write about

AI Build South Africa is an independent resource. We're not endorsed by, or an official partner of, PayFast, Yoco, Peach Payments, Ozow, Meta, Lovable, Base44, Bolt.new or Anthropic. We do participate in affiliate and referral programmes with some of these providers, including Base44. See our Disclaimer for the full disclosure and our Terms of Service for the wider terms.

Frequently asked questions

Do I need to learn how to write API calls if my AI builder handles it?

No. Your AI agent writes the actual request. What's worth knowing is what the term means when it shows up: in an error message, in a platform's own documentation, or in a field asking you to paste an API key. Recognising it saves you from treating a normal, expected setup step as a mysterious error.

What's the actual difference between an API and a website?

A website is built for a person to read in a browser: layout, images, buttons. An API is built for one program to talk to another. There's no visual page behind it at all, just structured data going in and structured data coming back. Your AI builder's frontend is a website; PayFast's payment endpoint your Edge Function calls is an API.

Why do some APIs need an API key and others don't?

A key identifies who's asking and what they're allowed to do. Public information anyone can request, like a country's current exchange rate, often skips this. Anything that identifies your account, bills you per use, or touches real data, a payment, a WhatsApp message, your own database, needs a key so the service knows it's genuinely you asking, not anyone who found the URL.

Is an API the same thing as a webhook?

Related, not the same. Calling an API is your app asking another service to do something right now. A webhook runs the other direction: the other service calls your app, unprompted, when something happens on its end, a payment completing, a WhatsApp message arriving. Same underlying request-and-response mechanics, opposite direction.

Do APIs cost money to use?

Some are free, some charge per call, and some are free up to a limit and then charge. It depends entirely on the service, not on APIs as a concept. Payment providers usually charge for each transaction instead of each call. Check the provider's own pricing page before assuming either way.

What happens if a platform changes how its API works?

Your integration can break silently, sometimes with no error until a specific feature is used. Platforms usually announce breaking changes in a changelog first, so treat any guide's API details as correct only as of the date it was checked. A sudden, unexplained failure in something that worked yesterday is worth checking the platform's own changelog before assuming your own code broke.

Related reading