App Developers
For developers building with the OpenRouter API: create a scoped API key, send requests, parse responses, handle errors, stream tokens, call presets, add backup models, and control provider routing.
Lessons
What is OpenRouter?
- Welcome to OpenRouter
What OpenRouter is, the problem it solves, and what this course covers.
Lesson 1, 3 min - Create an account and sign in
Personal accounts, organization invites, and switching contexts.
Lesson 2, 5 min - What OpenRouter is, and the models page
How authors, providers, and OpenRouter fit together, and filtering the model catalog.
Lesson 3, 6 min - How OpenRouter routes a request
How OpenRouter picks a provider for each request, why it can change, and slug shortcuts that steer it.
Lesson 4, 6 min Account-level vs. workspace-level pages, Activity, Logs, and Credits.
Make your first request
- Create your first API key
Workspace key scoping, ownership, spending limits, and secret storage.
Lesson 6, 7 min - Make a request
Authentication, the
/chat/completionspayload, and switching models.Lesson 7, 9 min - Read the response
Parsing
choices,finish_reason,model,provider, andusage.cost.Lesson 8, 8 min - When a request fails
Diagnosing and fixing
401,402, and429error responses.Lesson 9, 8 min - Stream it
Server-sent events (SSE,
stream: true), mid-stream error chunks, and request cancellation.Lesson 10, 10 min
Control routing and fallbacks
- Use a preset
Referencing
@preset/slugs and overriding parameters per request.Lesson 11, 7 min - Keep working when a model fails
Configuring backup
modelsarrays and fallback billing.Lesson 12, 7 min - Control provider routing in requests
Passing the
providerobject in requests (sort,order,only,ignore,allow_fallbacks,zdr).Lesson 13, 9 min