One API in front of every model.

monkway is an LLM gateway and router, built from scratch. It takes one request, routes it to the right provider, retries and falls back on failure, caches answers, and tracks cost and limits. Built in the open, and taught one piece at a time.

Start the course View on GitHub

The idea

Meet the gatekeeper

Picture a gatekeeper monk at the monastery gate. Every traveler arrives at one door. That one monk is the whole gateway, and every feature monkway has is just one more thing he does:

How it's built

Two stages

v1

Proxy

A single-provider proxy with retry, backoff, and structured logging of tokens, latency, and cost. Small in lines, the floor under it all.

v2

Router

Multi-provider routing, a semantic cache, cross-provider fallback, and per-key budgets and rate limits. Where it becomes a system.

The course

19 lessons

What you'll learn

An interactive course that teaches the concepts behind monkway, then leaves the implementation to you, which is where the understanding sticks. Six units, nineteen lessons, each with a demo you can drive. Start at the gate.

  1. 0

    The gate

    What a gateway is, and why one door in front of many models.

  2. 1

    The proxy

    Forwarding a request, and what "the same API" really means.

  3. 2

    When it fails

    Retries, backoff and jitter, timeouts, and idempotency.

  4. 3

    Choosing a path

    Routing policy: cost vs latency vs quality, and fallback.

  5. 4

    Remembering answers

    Exact vs semantic caching, embeddings, nearest-neighbor lookup.

  6. 5

    The ledger

    Token accounting, cost, rate limits, and per-key budgets.

See the full course map →