Buildathons.ai

Chain multiple LLMs with OpenRouter Course

Build a sequential LLM pipeline that uses different models for different tasks — cheaper, faster, and more accurate than using one model for everything.…

Course overview

Build a sequential LLM pipeline that uses different models for different tasks — cheaper, faster, and more accurate than using one model for everything.

Set up OpenRouter

Get your OpenRouter API key from openrouter.ai/keys and install the OpenAI SDK.

Create the base client

One client, all models.

Build the chained pipeline

Use cheap models for extraction/classification and strong models only when needed. This pipeline uses a free Llama model for extraction (cheap), DeepSeek for reasoning (smart), and Claude Haiku for writing (quality) — all through one API key.