apyhub
Cover illustration for API Fundamentals: What an API Is and How to Use One Without Writing Code
ApyHub

API Fundamentals: What an API Is and How to Use One Without Writing Code

You described an app. The AI built it. It works.

Then you asked for something real. Read the text off a photographed receipt. Check if an email address exists. Turn a document into a PDF.

And it broke. Or worse, it looked fine and was quietly wrong.

That wall has a name. Getting past it is the most useful thing you can learn right now.

This is what APIs are and how to use one. No code needed.

01The Short Answer

An API is a way for your app to ask another program to do a job and send back the result.

That is it. Your app sends a question, something else does the work, an answer comes back.

You already use them constantly.

A website shows you a map. It did not draw that map. It asked Google.

A shop takes your card. It did not check your balance. It asked Stripe, which asked your bank.

Every app you have used is mostly a thin layer over other people's APIs.

02Three Ways to Think About It

Pick whichever one sticks.

The restaurant. You order. You do not go into the kitchen. You do not build the kitchen.

You tell the waiter what you want and food arrives. The API is the waiter. The menu is the documentation: it tells you what you can ask for.

The specialist. You are building a house. You do not learn plumbing. You call a plumber.

Your app is the house. APIs are the trades.

The vending machine. Press the right buttons, get the thing you wanted. What happens inside is not your problem.

Pressing the right buttons is the only technical part of this.

03Why This Matters More Since AI Tools

Here is the thing nobody tells you when you start building with Lovable, Bolt, Replit, or v0.

An AI can write code. It cannot reach the world.

Ask it for a login page and you get one. That is code.

Ask it for today's exchange rate and you get nothing useful. That is a fact about the world, and no amount of code-writing produces it.

Ask it to read a photographed receipt and it will try. The result will look plausible and be wrong at the edges.

That second failure is the dangerous one. Broken code tells you it is broken. Half-working code does not.

APIs are how your app reaches things that are true right now.

04What Your App Can't Do On Its Own

If you have hit any of these, you have hit the API wall:

What you wantedWhy it did not work
Read text off a photo or scanNeeds a real OCR engine, not generated code
Convert a Word file to PDF properlyNeeds document rendering software
Check if an email address is realNeeds to actually ask that mail server
Today's exchange rate, weather, stock priceFacts about right now, not knowledge
Validate a VAT number or bank accountNeeds to check a real registry
Process a video, resize images at scaleNeeds heavy machinery your browser does not have
Check whether a website is legitimateNeeds live lookups against registries

In every case the answer is the same shape: somebody already built that, exposed it as an API, and you can use it in about the time it takes to read this sentence.

05Why Not Just Let the AI Build It?

Reasonable question. Sometimes the answer is that you should. Three reasons it is often the wrong call.

Generating costs more than calling. Ask an AI tool for a PDF converter. It writes code. It hits an error. It rewrites. It hits another error. It tries a third way.

Every attempt costs you credits. Calling something that already works costs a fraction of a cent, once.

It cannot do some of it at all. No amount of code writing produces today's exchange rate or confirms an email inbox exists. Those are questions about the world, not problems to solve.

Working once is not working. The AI handles your one test file fine.

Then a real user uploads a photo taken at an angle. Or a 40MB PDF. Or a format you never thought about.

Code written to satisfy one example breaks on the second.

The rule of thumb: if it is a common problem, someone has already solved it properly. Building it yourself is only worth it when the thing is genuinely specific to you.

06The Four Things You Actually Need to Know

This is the entire technical content of using an API. There is not more.

1. The API key. A long string that identifies you. Like a membership card. You get one at signup.

2. The endpoint. The address you send to. It looks like a web address because it is one.

3. The request. What you send. A file, a URL, some text.

4. The response. What comes back. Usually structured text called JSON, which looks like this:

· html
{
  "email": "[email protected]",
  "valid": true,
  "disposable": false
}

That is not code. It is labels and values. valid is true means the email is real.

You can read that without knowing any programming.

Your AI tool handles the plumbing. You just need to know the four pieces exist, so you can say what you want and understand what broke.

07How a Request Actually Works

Four parts to every request. You will see these words in every API's documentation, so it is worth five minutes.

The method. What kind of action this is. There are only a few and you will mostly meet two:

MethodMeansExample
GETFetch somethingGet today's exchange rate
POSTSend something to be processedUpload a file to convert
PUTReplace somethingUpdate a whole record
DELETERemove somethingDelete a saved item

If an API is doing work on something you send it, it is almost always POST.

The address. Where the request goes. It looks like a web address because it is one.

The headers. Small labels attached to the request. Your API key travels here, along with a note saying what format you are sending.

The body. The actual thing you are sending, on POST requests. A file, a URL, some text.

You will rarely build these by hand.

But when something fails, knowing which of the four is wrong turns a mystery into a five-minute fix.

08What the Numbers Mean

Every response comes back with a three-digit code before anything else. Learning six of them will save you hours.

CodeWhat it meansWhat to do
200WorkedNothing, you are fine
201Created somethingAlso fine
400Your request was malformedSomething you sent is wrong or missing
401Key missing or wrongCheck your API key
403Key is valid, not allowed to do thisWrong plan or wrong permission
404Not foundWrong address
429Too many requests, too fastWait, then try again more slowly
500Their server brokeNot your fault, try again later

The shortcut: 4xx means you made a mistake, 5xx means they did.

That one distinction is worth more than anything else here except the security section.

When your app breaks, paste the actual code into your AI tool. "It returns 401" gets you a fix. "It doesn't work" gets you guesses.

09Fast and Slow APIs

Some jobs finish instantly, some do not, and they work differently.

Fast ones answer straight away. You ask, you wait a moment, you get your answer. Validating an email, converting a currency, checking a domain. Almost everything works this way.

Slow ones give you a ticket. A large video takes minutes. No request stays open that long.

So the API hands you a job ID straight away. Your app checks back until it is done. Like a dry cleaner: you get a ticket and come back.

Your app handles these two differently. Worth knowing before you build, not while you debug. ApyHub marks every service sync or job on its listing.

10Reading Documentation Without Fear

API documentation looks intimidating and mostly is not. Look for four things, in this order, and ignore everything else until you need it.

  1. How do I authenticate? Where does my key go. Nothing works until this is right.
  2. What is the address? The endpoint for the thing you want.
  3. What do I have to send? Required fields, and what format they need to be in.
  4. What comes back? A sample response, so you know what your app will receive.

Everything else in the docs is detail you can return to. If there is a sample request you can copy, copy it.

11Testing an API Before You Build

This is the step almost everyone skips, and it is the one that saves the most time.

Send one request by hand first. Look at what comes back.

Two minutes here saves an afternoon debugging an integration that was never going to work.

Three ways to do it, easiest first.

The provider's playground. Most good API providers have a page where you paste your key, fill in the fields, hit send, and see the real response. Nothing to install, nothing to configure. Every ApyHub service page has one. Start here.

A desktop API client. For saving requests and testing several endpoints together.

Postman is the best known. Insomnia and Bruno are lighter.

Voiden works offline and saves requests as plain Markdown files. They sit in your project folder, not in someone's cloud account, and you can read them without opening the app.

The terminal. Every API's documentation includes a curl command you can paste straight in. curl is already installed on your machine. You do not need to understand it to use it, and copying the sample from the docs works.

What to actually check while you are there:

  • Does the response contain the field you expected, with the name you expected
  • What happens with a difficult input, not your clean sample file
  • What an error looks like, so you recognise it later
  • How long it takes, since a two-second call inside a page load is noticeable

Then tell your AI tool what you found. "This endpoint returns a field called valid that is true or false" is a far better instruction than "use this API."

12How to Actually Add One

The workflow, without code:

Find something that does the job. Search a catalog for what you need. "Convert Word to PDF." "Validate email." "Extract text from image."

Try it before you build. Good API providers give you a playground: a page where you paste your key, upload a file or type a value, hit send, and see the real response. Do this first. It takes a minute and it tells you whether the output is what you expected before you have wired anything up.

Tell your AI tool to use it. This part surprises people. You do not write the integration. You say something like: "Add a feature that uploads a document and converts it to PDF using the ApyHub API. My key is in the environment variables." The tool writes the code.

Test with something ugly. Not your clean sample file. A photo taken at an angle, a document in another language, an empty field. That is what your users will send.

Get a free API key and try one. No credit card, and you can send a real request from the browser before writing anything.

13The One Thing That Will Get You In Trouble

Please read this part.

Never put your API key directly in your app's code.

AI-built apps leak API keys constantly. It happens because pasting the key into the code is the obvious move.

You have a key. The code needs the key. So you paste it in. Then you deploy.

Now anyone who opens their browser's developer tools can read it. And use it. On your account. At your expense.

What to do instead:

  • Use environment variables. Every one of these tools supports them: Lovable, Bolt, Replit, and v0 all have a settings area for secrets. Put the key there and reference it by name.
  • Tell your AI tool explicitly. Say "store the API key in an environment variable, never in the frontend code." It will do it, but it does not always do it unprompted.
  • Never paste a key into a public chat, a screenshot, or a GitHub repo.
  • If you think a key leaked, revoke it and make a new one. This takes ten seconds and costs nothing.

If you learn one thing from this article, this is the one.

14What It Costs

Less than people expect, and the pricing model matters more than the price.

Most APIs charge per call, and most calls cost a fraction of a cent. A validation lookup, a currency conversion, a file conversion: fractions of a cent each. Heavy things like reading text out of a scanned document cost more, because they do more work.

Two things to watch:

Free tiers are for testing, not building. Nearly every provider has one. They exist so you can check the thing works.

ApyHub's free plan is 5 calls a day, no credit card. Enough to see if the output suits you.

One account beats ten. Five capabilities from five providers means five signups, five keys to keep safe, five bills.

A catalog where one key covers everything is a lot less to manage. That matters more than it sounds when you are not a developer.

15Where to Start

The most useful ones for people building apps with AI tools, roughly in order of how often they come up:

File conversion - Word to PDF, PDF to Word, images to PDF, spreadsheets to PDF. The most common thing an app needs and the most common thing AI-generated code gets wrong.

Data validation - is this email real, is this phone number valid, is this bank account well-formed. Stops your database filling up with nonsense.

AI and OCR - read text out of photos and scans, pull fields out of receipts and invoices, summarise, translate, analyse sentiment.

Standard data - currency conversion, country lists, time zones. The things that seem trivial until you try to keep them up to date.

Content extraction - pull the readable text out of a web page without the navigation and ads.

Browse everything | Start free

16Conclusion

An API is a way to ask someone else's software to do a job for you.

You are already building things that needed a team five years ago.

The wall you hit is not a skills problem. Some things cannot be generated, only called. Knowing the difference is most of what separates a demo from something people can use.

Find the thing that does the job. Try it in a playground. Tell your AI tool to wire it up. Keep your key out of the code.

Get a free API key

17FAQ

What is an API in simple terms?

An API is a way for one piece of software to ask another to do a job and send back the result. Your app sends a request, something else does the work, an answer comes back. Showing a map, taking a card payment, and checking the weather are all APIs.

Do I need to know how to code to use an API?

No. If you are building with Lovable, Bolt, Replit, v0, or a similar tool, you describe what you want and the tool writes the integration. What you need to understand is what an API key is, where to put it safely, and how to read the response so you can tell whether it worked.

Why can't my AI tool just build the feature instead?

Some things cannot be generated at all, like today's exchange rate or whether an email inbox exists, because they are facts about the world rather than code problems. Others can be generated badly: an AI will write something that handles your test file and breaks on real user input. Common problems have usually already been solved properly by someone else.

How much do APIs cost?

Most calls cost a fraction of a cent, with heavier work like reading text from a scanned document costing more because it does more. Most providers have a free tier for evaluation. ApyHub's free plan allows 5 calls a day with no credit card.

Where do I put my API key?

In environment variables, never in your app's code. Lovable, Bolt, Replit, and v0 all have a settings area for secrets. If a key ends up in frontend code, anyone visiting your site can read it in their browser's developer tools and use it at your expense.

What is an API key?

A long string of characters that identifies you to the service, like a membership card. You receive one when you sign up and your app sends it with every request. If it leaks, revoke it and generate a new one, which takes seconds.

What is JSON?

The format most APIs use to send answers back. It is a list of labels and values, like "valid": true. It looks technical and it is readable without any programming knowledge, which is the point.

What is an API playground?

A page on the provider's site where you can try an API in your browser: paste your key, enter a value or upload a file, and see the actual response. Using one before you build is the fastest way to find out whether an API returns what you expected.

What can I use APIs for in an app I built with AI?

Most commonly: converting files, reading text out of photos and scans, validating emails and phone numbers, currency conversion, extracting content from web pages, and summarising or translating text. These are the capabilities AI tools most often fail to generate reliably.

What is the difference between GET and POST?

GET fetches something without changing anything, like looking up an exchange rate. POST sends something to be processed or created, like uploading a file to convert. If an API is doing work on data you send it, it is almost always POST.

What do API error codes mean?

The first digit tells you most of it. 2xx means it worked. 4xx means something about your request was wrong: 401 is a bad or missing key, 400 is a malformed request, 404 is the wrong address, 429 means you are going too fast. 5xx means their server failed and it is not your fault.

What is the difference between a synchronous and an asynchronous API?

A synchronous API answers within the request, usually in under a second. An asynchronous one handles work that takes longer, like converting a large video: it gives you a job ID immediately and your app checks back until the result is ready. The two need different handling in your app.

How do I test an API before using it?

Send one request by hand and look at the response before wiring anything up. The fastest way is the provider's playground, a page where you paste your key, fill in the fields, and see the real result in your browser. For repeated testing, use a desktop client. Check that the response contains the field you expected, what an error looks like, and how it behaves with a difficult input rather than your clean sample.

What tool should I use to test APIs?

Start with the provider's own playground, since there is nothing to install. When you need to save requests and compare endpoints, Postman is the most widely used, with Insomnia and Bruno as lighter alternatives. Voiden works offline and stores requests as Markdown files that sit in your project folder and stay readable outside the app, which suits anyone who would rather not keep their API work in a cloud account.

Can I test an API without installing anything?

Yes. Most providers offer a browser-based playground where you paste your key and send a real request. Every ApyHub service page has one. Failing that, curl is already installed on your computer and every API's documentation includes a copyable curl command.

How do I read API documentation?

Look for four things and ignore the rest until you need it: how to authenticate, the address to send to, what fields are required, and a sample of what comes back. If there is a copyable sample request, start from that.

Is it better to use an API or build the feature myself?

If the problem is common, an API almost always wins on cost, reliability, and time. Build it yourself when the thing is genuinely specific to your product, which is rarer than it feels while you are building.

18About ApyHub

ApyHub is a catalog of ready-to-use APIs for developers, teams, and AI tools. One account and one key cover everything: file conversion, data validation, AI and OCR, content extraction, standard data, and more across 20 categories.

Every service page has a playground so you can try it in your browser before writing anything. Every endpoint is MCP-ready, so AI tools can find and use them directly.

ApyHub is headquartered in Amsterdam, with offices in the Netherlands, Greece, and India, and runs on EU infrastructure. The catalog holds 450+ services and 1,500+ endpoints, with new APIs added continuously. The free tier allows 5 calls a day and needs no credit card.