Syllabus

  1. 01Getting Started with the OpenAI APIWhat the OpenAI API is and how a JavaScript program talks to it: tokens and context windows, creating a client with a safely stored API key, sending a chat completion request, and reading the request and response as plain data.6 lessons
    1. 01Generative AI and the API
    2. 02The Client and Your API Key
    3. 03Your First Chat Completion
    4. 04The Request and Response as Plain Data
    5. 05Tokens and the Context Window
    6. 06Getting started quiz
  2. 02Prompting TechniquesShape what the model does: set behavior with system messages, teach a format with few-shot examples in one prompt or as message pairs, keep conversations going by sending history, control replies with parameters, and test output that changes from run to run.7 lessons
    1. 01System Messages
    2. 02Few-Shot Prompting in One Prompt
    3. 03Few-Shot Prompting with Message Pairs
    4. 04Conversations and Context
    5. 05Model Parameters
    6. 06Testing Output That Changes
    7. 07Prompting quiz
  3. 03Building Reliable FeaturesMake API code dependable: handle errors and retry the right ones, get replies in a format your code can parse and validate, read the Responses API's request and response shape, and put it all together in a trail journal assistant.5 lessons
    1. 01Handling API Errors
    2. 02Replies Your Code Can Parse
    3. 03The Responses API Shape
    4. 04Project: Trail Journal Assistant
    5. 05Reliable features quiz