← All AI providers

OpenRouter

CodeHero with your own OpenRouter key.

CodeHero PRO works with OpenRouter using your own API key. One key opens OpenRouter’s catalogue of models from many AI companies; CodeHero gives them its roles — planning, building, checking — and you pay OpenRouter directly for what they use.

Add it to CodeHero

In the CodeHero panel, click Providers in the header (it reads Configure Providers before the first one). In the OpenRouter row choose API Key, paste the key and press Save. The key is stored on your CodeHero server.

The OpenRouter row in Providers: the key field, API Key and Save

Choose OpenRouter for a project or a ticket

When you create a project, choose OpenRouter as its AI provider; its tickets follow it. A ticket can also have its own: New Ticket → AI Provider. The AI Role — Master, Senior or Junior Developer — decides the model.

New Ticket: AI Provider set to OpenRouter and AI Role set to Junior Developer

Which model each role uses

Each role uses an OpenRouter model set in CodeHero’s configuration file (heroagent.conf). By default these are open Qwen models: qwen/qwen3.8-flash for Master Developer, qwen/qwen3.8-27b for Senior and qwen/qwen3.6-35b-a3b for Junior.

The same file lists the catalogue CodeHero uses — models of Anthropic, OpenAI, xAI, DeepSeek, Qwen and others, by their OpenRouter name such as anthropic/claude-sonnet-5 — and the assistant can give a single ticket one of them. The administrator changes the model of a role, or adds a model to the list, in that file.

The builder and the checker

Each ticket has its own provider. By default the work is checked by a model of a different AI company. CodeHero tells the companies apart by provider: when OpenRouter is the only provider connected, the check also runs on OpenRouter and is recorded as a same-provider check.

For an independent check, connect a second provider too — a Claude or ChatGPT subscription, for example, or another company’s API key.

Your data

For each step, the model receives the parts of the work it needs: the ticket’s instructions, the code it reads, the output of its commands — never the values of your stored secrets (below). On every request CodeHero asks OpenRouter only for providers that do not collect the data for training; for some models it also asks for zero data retention. OpenRouter’s own terms and privacy settings apply.

Your secrets stay on your server — with any model

Store passwords, keys and tokens as the project’s secrets: on the project page, under 🔐 Secrets. Your application uses them, but their values never reach the model — whichever model you choose on OpenRouter. CodeHero checks every command and every output on your server before anything is sent: a command that would carry a secret is refused, and an output that contains one is held back or shown with the value hidden. If the check itself fails, nothing is sent.

Secrets are also left out of the project’s git and ZIP backups. The limit: it covers stored secrets of eight characters or longer. A password typed into a chat message or visible in a screenshot cannot be recognised — store every password as a secret.

If something goes wrong

  • Invalid key (401). The ticket stops with OpenRouter’s message. Enter the key again under Providers, then retry the ticket.
  • No credits (402). CodeHero treats it as a used-up limit: the ticket waits and tries again by itself. After you add credits, a message to the ticket tries at once.
  • Model not available. OpenRouter answers that no provider serves the model — models are retired from time to time. The administrator replaces it in heroagent.conf.

All the AI companies CodeHero works with, and how one builds while another checks: Independent of any one AI company

Questions people ask

All the articles
Am I tied to one AI company?

No. CodeHero works with many AI companies at once and with models on your own hardware. You can change company or model at any time — the project, its rules and its history stay. Read the article

Do my passwords and keys reach the AI company?

Not the ones you store as secrets (eight characters or longer): your application uses them, but their values are not sent to the AI service. A password typed into a chat message or shown in a screenshot cannot be recognised — store every password as a secret. Read the article

Why do several AIs work on the same job?

Because one AI does not catch its own blind spots. In CodeHero one model builds and, by default, a model from a different company checks; problems go back for repair and are checked again. Read the article