Auto Code - API Pricing & Providers | OpenRouter
Favicon for openrouter

Auto Code

openrouter/auto-code

Auto Code is OpenRouter’s router built specifically for coding agents and harnesses. It uses the same routing engine as the Auto Router, with every request treated as part of an agent session and model choices guided by coding-task pass rate, completion time, and cost per solved task.

It follows edits, test results, and recurring errors across turns, keeping the model while work is going well and trying more reasoning effort before switching when trouble persists. Its default coding tier starts from stronger models and weighs failed code changes more heavily. Your model and provider restrictions still apply.

Live routing

Explore actual agent usage and how the router chooses models for new work.

API

Drop-in code to call this model. OpenRouter's API is OpenAI-compatible — most SDKs work by just swapping the base URL. The only thing that changes between models is the model slug below.

Not currently available through EU in-region routing. In-region routing docs

Documentation

Guides, cookbooks, blog posts, and tools for building with Auto Code on OpenRouter.

Frequently asked questions