Calling a Model
A model call is an HTTPS request with JSON. Build it by hand, read the reply, keep keys safe, classify errors, set timeouts and hide providers behind one interface.
Every SDK, framework and agent product ends in the same thing: an HTTPS POST with a JSON body, and a JSON reply. This phase builds that request and parses that reply by hand, against a small fake server that runs in your browser, before any library is shown. Once you can read the raw request and response, SDK code stops being magic.
Then it covers what turns a demo call into a dependable one: how messages and roles make a conversation (the model remembers nothing), how to read finish_reason and usage defensively, where API keys may and may not live, what each HTTP error status means and which are worth retrying, why every call needs a timeout, and how to hide the provider behind a small interface so tests are cheap and switching providers is a config change.
Real-model labs let you send requests to a free hosted model and read the raw JSON. Real HTTP and SDK code (curl, Python, Java, JavaScript, the OpenAI-compatible SDKs, Anthropic, Vercel AI SDK, Spring AI, LangChain4j) is shown but not run, because it needs a key and a network. The phase ends with a production-shaped model client in all three languages.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.