Get your API key

Lesson 1 of 5

What an API is: requests, responses and status codes

Call a real pincode API from your browser and terminal, read the JSON like a sheet row, and learn what 200, 401, 404, 429 and 500 tell you to do.

8 min Free
One step at a time, like flipping pages.

By the end of this lesson you will call a real API yourself, read its answer like a row in a sheet, and know what each common status code is telling you to do.

You need: a browser; a terminal is optional (see open a terminal) · Time: 8 minutes

  1. Think of a chai stall. You don't walk into the kitchen and make your own chai. You tell the person at the counter "one cutting chai", and a cup comes back. You never see how it was made.

    An API (Application Programming Interface) is that counter, for programs. One program asks, another program answers, and there are fixed rules for how to ask.

    • The client is the program that asks: your app, your browser, or a command in the terminal.
    • The server is the computer that answers. It holds the data and the rules.

    You use APIs all day without seeing them. A UPI app asks your bank's server "is there ₹200 in this account?". A weather app asks a weather server "what is the temperature in Pune?". When your coding agent talks to an AI model through AllModelAPI, it is calling an API too.

    Why?

    Almost every app you will build is a client talking to one or more servers. When something breaks, the first question is always "what did we ask, and what came back?". This lesson teaches you to answer it.