How APIs Work
Discover how apps talk to servers — send real API requests and see live responses
Discover how apps talk to servers — send real API requests and see live responses
Imagine you're at a restaurant. You don't walk into the kitchen and cook your own food — you tell the waiter what you want, and the waiter brings it back. An API works exactly the same way between apps and servers.
The app or website making the request — your browser, a mobile app, or any program that needs data.
The messenger that takes your request to the server and brings back the response. It defines what you can ask for and how to ask.
The backend that does the work — stores data, runs logic, and prepares the response you asked for.
Every API request is just a URL with a specific structure. Click each part below to see what it does.
👈 Click any colored segment above to learn what it does
Requests also have a method that tells the server what action to take. Click each one:
👈 Click a method badge above to see a real-world example
"Give me data." Used for reading — loading a page, fetching a list, viewing a profile. Safe and repeatable.
"Create something new." Submitting a form, uploading a file, saving a new project.
"Update this." Changing your username, editing a project, updating settings.
"Remove this." Deleting a project, removing a comment, clearing data.
When APIs send data back, they use JSON — a simple text format that's easy for both humans and computers to read. Click the brackets to collapse/expand, or search for a field.
JSON is made of pairs: "name": "Pixel Art". The key is always a string, the value can be text, numbers, lists, or nested objects.
Values can contain other objects using { } — like a folder inside a folder. This lets APIs return complex, structured data.
Square brackets [ ] hold ordered lists of items — like an array of projects, tags, or comments.
Time for the real thing! Pick an endpoint below and send an actual API request to this platform's server. You'll see real data come back.
These aren't fake examples — the response comes directly from this platform's API server, right now.
These endpoints don't need a login because the data is public. Your own projects would need authentication.
curl. The API doesn't care who's asking, as long as the request is valid!
Public data is free for anyone. But what about your projects? The server needs to know who's asking. That's where API keys come in. Try toggling the key below.
X-API-Key: mtek_abc123...
Send your key in the request header. Best for scripts, server-to-server calls, and terminal requests.
Platform.api('/gallery', { sort: 'popular' })
If you're building inside the platform, this helper handles auth automatically — no key needed in your code.
You now understand how every app, website, and service communicates behind the scenes. APIs are the invisible glue of the internet!
APIs sit between clients and servers, translating requests into responses — like a waiter in a restaurant.
GET reads, POST creates, PUT updates, DELETE removes. The method tells the server what you want to do.
APIs speak JSON — structured key-value pairs that any programming language can read and write.
API keys and tokens prove who you are, so the server knows what data you're allowed to access.
Put your new knowledge into practice!