What an API Is
25%
Lesson 2 of 8

What an API Is

An API is a defined way for one program to request a capability or data from another program.

Active reading
Request

What your app asks for.

Endpoint

Where the request is sent.

Response

What comes back.

Think of an API as a contract

Your application sends a structured request that follows the API rules. The service processes it and returns a structured response.

The browser interface, your server and the model provider can be separate systems connected by APIs.

Example
Browser → your server API → model API → your server → browser.
Quick check

Explain this lesson back in one sentence before continuing. If you cannot, reread the example and key takeaway.

Common mistake

Do not assume an API call is safe just because it works. Authentication, validation and error handling still matter.

Key takeaway

An API defines how software systems exchange requests and responses.

Next lesson

Keep Keys on the Server

Continue to the next lesson.

Continue →