App Developers

About 92 minutes

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?

  1. Welcome to OpenRouter

    What OpenRouter is, the problem it solves, and what this course covers.

    Lesson 1, 3 min
  2. Create an account and sign in

    Personal accounts, organization invites, and switching contexts.

    Lesson 2, 5 min
  3. What OpenRouter is, and the models page

    How authors, providers, and OpenRouter fit together, and filtering the model catalog.

    Lesson 3, 6 min
  4. 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
  5. Find your way around

    Account-level vs. workspace-level pages, Activity, Logs, and Credits.

    Lesson 5, 7 min

Make your first request

  1. Create your first API key

    Workspace key scoping, ownership, spending limits, and secret storage.

    Lesson 6, 7 min
  2. Make a request

    Authentication, the /chat/completions payload, and switching models.

    Lesson 7, 9 min
  3. Read the response

    Parsing choices, finish_reason, model, provider, and usage.cost.

    Lesson 8, 8 min
  4. When a request fails

    Diagnosing and fixing 401, 402, and 429 error responses.

    Lesson 9, 8 min
  5. Stream it

    Server-sent events (SSE, stream: true), mid-stream error chunks, and request cancellation.

    Lesson 10, 10 min

Control routing and fallbacks

  1. Use a preset

    Referencing @preset/ slugs and overriding parameters per request.

    Lesson 11, 7 min
  2. Keep working when a model fails

    Configuring backup models arrays and fallback billing.

    Lesson 12, 7 min
  3. Control provider routing in requests

    Passing the provider object in requests (sort, order, only, ignore, allow_fallbacks, zdr).

    Lesson 13, 9 min