Learning path

Working with LLM APIs

Get API keys for OpenAI, Claude, Gemini and Grok, make your first calls in Python, and handle chat history, streaming, JSON output, errors, cost and security. Part of the Gen AI Developer premium track.

  1. 1

    Getting API Keys: OpenAI (ChatGPT), Claude, Gemini and Grok, Plus Free Options

    Step by step, how to create a developer account, add credits and get an API key from OpenAI, Anthropic, Google and xAI, what it costs, which free options…

    5 min read
  2. 2

    Your First API Call in Python: Claude, OpenAI, Gemini and Grok

    The minimal Python code to call Claude, OpenAI's GPT models, Google Gemini and xAI Grok, what comes back, and how to wrap them in one function you can…

    5 min read
  3. 3

    Chat History and System Prompts: Building a Chatbot That Remembers

    LLM APIs have no memory. Learn how chatbots remember by resending the conversation, how system prompts set behaviour, and how to stop long chats from getting expensive.

    4 min read
  4. 4

    Streaming Responses: Show Answers Word by Word

    Why chat apps stream answers, how to stream with the Claude, OpenAI and Gemini SDKs, and how to build and test a streaming loop with a Python generator,…

    3 min read
  5. 5

    Structured Output: Getting Reliable JSON from an LLM

    Make LLMs return JSON your code can trust, using schemas, Pydantic and the providers' structured-output features, and validate everything with plain Python before you use it.

    3 min read
  6. 6

    Errors, Retries, Rate Limits and Cost Control

    Handle every API error the right way, retry with exponential backoff, stay within rate limits, and estimate and cap your AI bill before it surprises you. With runnable…

    4 min read
  7. 7

    Keeping API Keys and User Data Safe in AI Apps

    Where API keys belong, why the browser must never call an LLM API directly, how to remove personal data before sending it, rate-limit users, and defend against prompt…

    4 min read