Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 24 · System Design · OpenRouter · about 26 min to read

Watch: One API, every model: what does one request shape cost you?
▶ VideoPlay it as a journeyTutor comes with a plan

OpenRouter, the case study

Everything
Everything · Open board

The nine boards on one canvas.

Boards

Before you start. When an app answers you with AI, it is sending your text over the internet to a machine somebody else owns and paying that owner for the reply. This story is about the company that sits in the middle of that trip.

Lesson 98 of 115 in System Design

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 2023: dozens of shops selling the byte-identical thing
  • One door for all of them: the shared request, and the dialect that won
  • Choosing the seller: the router, and why always-cheapest kills the cheapest
  • Billing a reply you only passed along: streaming, and the receipt in the last frame
  • When a seller dies mid-sentence: fallback, and the door that can close on all of them
  • The toll booth, and the one thing nobody can copy
  • What is derived, and what is documented
  • The numbers that are sourced
  • The unified request, in detail
  • The nine knobs
  • Streaming, and what the pipe must not do
  • The meter, and the cost vector
  • Failover machinery
  • The business, and the nervous part

Terms it explains: tokens, router, streaming, fallback, order flow, SOURCED, PATTERN, not OpenRouter's code, ESTIMATE, LESSON FRAMES, 25 trillion, >1 quadrillion tokens/year, 400+ models, 70+ providers, 8M+, $113M at $1.3B, 5.5%, 5%, 30 seconds, 1/price², 7-day, OpenRouter docs, The gateway patterns, The wire formats, Business.

Review System Design