Make your first request
Create a scoped API key, send a chat completion from your code, read what came back, and handle errors and streams.
Lessons
Send and read a request
- Create your first API key
Workspace key scoping, ownership, spending limits, and secret storage.
Lesson 1, 7 min - Make a request
Authentication, the
/chat/completionspayload, and switching models.Lesson 2, 9 min - Read the response
Parsing
choices,finish_reason,model,provider, andusage.cost.Lesson 3, 8 min