Learn AI Math

REST API

What is REST API?

In one sentence: A REST API is a common style of web API where programs send requests to web addresses using standard actions like GET and POST.

Each address represents something, like "/messages," and the request says what to do with it. Data is usually sent as JSON.

What does REST API look like?

Sending a POST request with your prompt to a model provider's "/v1/messages" address is using a REST API.

Why does REST API matter?

Most AI services offer REST APIs because they work with almost any programming language.

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.