Working with the API
Lecture 3.1
- Anatomy of an API call: messages, model, parameters, response
- Message roles: system, user, assistant — and how they shape behavior
- Streaming vs. non-streaming responses
- Token counting: tracking input/output usage and cost
- Error handling: rate limits, timeouts, malformed responses
- Practical patterns: retry logic, exponential backoff
Additional Resources