My default · OpenRouter · LLM access for client systems

OpenRouter

One SDK, one key, every model. Usually cheaper than running the same open models elsewhere.

In The Stack Weekly: W43: Decision models (Jev, and Cloudflare's Clef), watching · W43: DeepSeek V4.1 Flash 1017, worth a pilot

OpenRouter lets me pick the best cost-per-intelligence model per feature and change my mind later with one string. Same SDK, same key, every provider.

Use it when

  • Any AI feature in a client system: switch models without changing code.

Pricing

Model prices pass through; OpenRouter adds 5.5% on credit purchases. Example: DeepSeek V4 Pro at $0.66 / $1.98 per million tokens vs $1.32 / $3.96 on Cloudflare Workers AI.

Gotchas, with fixes

Gotcha: Calling it from the browser exposes your API key.

Fix: Always go through a server-side proxy. A Cloudflare Worker is ideal: see the LLM proxy guide.

Provisioning

Pulumi via a Terraform provider · Community Terraform provider

Vendor-published Terraform provider (OpenRouterTeam/openrouter): API keys, guardrails, workspaces, BYOK. Hosted MCP server available.

Instead, consider

Worked examples

Where it fits

Sources

Last reviewed by Nicolas Dao

Want this stack in your AWS account?

Cloudless Labs is a Sydney consultancy. We migrate on-premises systems to AWS, build serverless apps on this stack, and coach teams to ship with Claude Code and Codex.

Contact Us

For general inquiries, please contact us at:

For e-learning capabilities, please contact: