What an API Is
Understand requests and responses.
What an API Is is a free Vibe Coding lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Vibe Coding learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Why APIs Matter
An API (Application Programming Interface) is how one program talks to another. Instead of rebuilding maps, payments, or weather data yourself, you call someone else's service and get the answer back.
When you build software with an AI assistant, most real features come from connecting to third-party APIs. Learning to think in APIs lets you assemble powerful apps quickly.
A Restaurant Analogy
Think of an API like a restaurant menu. You don't go into the kitchen and cook. You read the menu, place an order with the waiter, and food arrives.
The menu is the API documentation, your order is the request, and the dish is the response. You never see how the kitchen works inside, only what it promises to deliver.
Requests and Responses
Every API interaction has two halves: a request you send and a response you receive. The request says what you want; the response carries the data or a status.
You can ask your AI assistant to explain this flow for any service you plan to use, so you know exactly what to send and what comes back.
Explain how a request and response work for the OpenWeatherMap API.
Show me one example request and what the response looks like.Endpoints Are Addresses
An endpoint is a specific URL where the API listens for one kind of request. A weather service might have one endpoint for current conditions and another for forecasts.
Each endpoint does a focused job. Knowing which endpoint to hit is half the battle when integrating any external service into your app.
HTTP Methods
APIs use HTTP methods to signal intent. GET fetches data, POST creates something, PUT or PATCH updates, and DELETE removes. The method tells the server what action you mean.
When unsure, ask your assistant which method an endpoint expects. Picking the wrong one is a common beginner mistake that returns confusing errors.
For the GitHub API, which HTTP method do I use to create a new issue,
and which one do I use to just read existing issues?JSON: The Common Language
Most modern APIs speak JSON, a lightweight text format of keys and values. A weather response might include "temp": 21 and "city": "Paris".
JSON is easy for both humans and code to read. Your AI assistant can turn a raw JSON response into clean variables your app actually uses.
Here is a JSON response from a weather API.
Show me how to pull out the temperature and city name in JavaScript.API Keys: Your ID Badge
Many APIs require an API key, a unique string that identifies and authorizes you. It is like an ID badge that lets you through the door and tracks your usage.
Keys are secret. Never paste them into public code or share them in chat. We will cover safe handling in a later lesson.
Rate Limits
APIs limit how many requests you can make in a time window, called a rate limit. Free tiers might allow 60 calls per minute, paid tiers far more.
Hitting the limit returns an error, not your data. Ask your assistant to check a service's limits before you build features that call it in a loop.
What are the free-tier rate limits for the TheMovieDB API,
and how should I structure my app to stay under them?Status Codes Tell a Story
Every response carries a status code. 200 means success, 401 means unauthorized, 404 means not found, and 429 means too many requests.
These numbers are your fastest debugging clue. When something breaks, the status code usually points straight at the cause before you read any error text.
Public vs Private APIs
Some APIs are public and free, like many weather or quote services. Others are private, needing accounts, billing, or approval, like payment and messaging platforms.
Knowing which kind you face shapes your setup. Ask your assistant to compare options so you start with the simplest service that meets your need.
I want to add quotes to my app. Suggest three free, no-signup APIs
and compare their ease of use for a beginner.Thinking in Integrations
Building with AI is mostly about wiring services together. A trip planner might combine a maps API, a weather API, and a currency API into one screen.
Once you see features as integrations, you describe the outcome to your assistant and let it handle the plumbing of requests, parsing, and display.
Quick Check
Test your understanding of API basics.
Recap
An API lets your app borrow another service's powers through requests and responses. You hit endpoints with HTTP methods, send and receive JSON, and identify yourself with keys.
Status codes and rate limits guide your debugging. Next, you will learn to read API docs quickly with help from your AI assistant.
Frequently asked questions
Is the “What an API Is” lesson free?
Yes — the full text of “What an API Is” is free to read here on the web, and the Vibe Coding course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Vibe Coding course, upgrade to CoddyKit PRO.
What will I learn in “What an API Is”?
Understand requests and responses. You practise Vibe Coding with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Vibe Coding?
No prior experience is required. Vibe Coding on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “What an API Is” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Vibe Coding lesson?
Yes. Every Vibe Coding lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.