Your First AI API Call
One fetch call. Now your app talks back.
▶ the lesson · ~35s · narrated · tap for sound
the intro
Calling an LLM is a normal HTTP request: you send a list of messages with roles, and the model responds with generated text. Add streaming for instant output. The skills to learn: message structure, streaming, and keeping API keys on the server.
fun fact ✦
The messages array is just chat history — role plus content, repeated. That is the whole protocol.
the docs
quick hits about Your First AI API Call
15-second answers · interviews, tips, trivia & hidden gems
📚 tutorial
What is in an LLM request?
🔧 useful
Where do API keys go?
💎 deep
Why does streaming feel 10x faster?
💎 deep
Why set max tokens?
🧠 trivia
What paper made LLMs mainstream?