Vibe Coder · Unit 10: APIs · Lesson 1 of 13

What an API is

An API is how one program asks another for something. Your app will use one to ask a model for an answer.

Read the short notes and pictures.Do everything inside a blue frame.

Programs talking to programs

In the Claude app, you type and Claude answers. In your product, the app itself has to send the question and use the answer. An API is the agreed way to do that: your code sends a request in a set format, and the service returns a response.

A 3D scene of coloured blocks and cards. An API: your app, a request, a service.
One program asks another for something.

The pieces

Endpoint

The address your app sends the request to.

Request

What you ask for: the model, the instructions, the user’s input.

Response

What comes back: the answer, and how many tokens it used.

Key

A secret that identifies your account.

A 3D scene of coloured blocks and cards. : Request, Response.
A request goes out and a response comes back.

An AI feature, step by step

  1. The user does something

    Presses "Summarise".

  2. Your server builds a request

    With your instructions and their text.

  3. The model answers

    Through the API.

  4. Your app shows the result

    And saves it if needed.

ActivityBuild stepOne AI feature

Choose your AI feature

Pick the one AI feature your product will have, and write it as a sentence: when the user does X, the app sends Y to a model and shows Z. Add it to your build brief.

Done when

You will build exactly this feature across the unit.

Keep these

  • An API lets programs ask each other for things.
  • A request goes out, a response comes back.
  • A key identifies and bills your account.