Skip to content
Back to course

17.3 APIs

An API (Application Programming Interface) is the doorway through which other software talks to your model. Instead of bundling the model into every app, you host it once behind an endpoint; clients send a request with input data and get back a prediction as a response — usually as JSON over HTTP.

TrainPackageDeployServeMLOps lifecycle
A client sends a request to the model's API endpoint and receives a prediction.

A delivery app in Addis Ababa wants estimated arrival times. Rather than running a model on every phone, it calls a single prediction API: it POSTs the pickup and drop-off points, and the server returns an ETA in seconds. The mobile app stays small and the model can be improved without updating phones.

Scenario

Your model API is public and someone sends 10,000 requests per second, overloading it. Which protection is most directly relevant?

Check your understanding

1/4 · 40 XP

What format is most commonly used to exchange data with a model API over HTTP?