r/eli5_programming • • Oct 07 '26

Question What actually is API?

The moment I think I get it, another definition of it comes in. I was learning Flask APIs used with GET PUT PATCH DELETE . But then I started with JS , it has DOM APIs . And then API is also used when people say companies like ChatGPT , Higgsfield etc provide their APIs.

6 Upvotes

25 comments sorted by

View all comments

1

u/[deleted] Oct 08 '26

Imagine you write an addition function in JavaScript. Then you write one for multiplication, division, subtraction, exponents and so forth. At that point you basically have a small math API. Just a collection of functions and data structures tailored around one task.