This capability needs the plan or higher.
Before you start
Before you start, sign in to the dashboard and select the organization you want to work in.- You need the Admin role on a Premium or Enterprise plan. Other members do not see the Integrations page, and Free organizations do not see the Model Provider tab.
- Have an OpenRouter API key ready. Keys start with
sk-or-. You create them on the OpenRouter keys page, which the add dialog links to. - The key is used for the model calls of your agents’ AI Agent gambits. See AI Agent gambit for where an agent picks its model.
Open the Model Provider tab
Open Settings, select Integrations, then select the Model Provider tab. The Integrations page has three tabs: API Keys, Identity Verification, and Model Provider. Before a key exists, the tab shows one OpenRouter card. The card says the key unlocks any model on OpenRouter, is encrypted at rest, and is decrypted only at request time. Below the text sits a single Add OpenRouter Key button.Add your key
1
Select Add OpenRouter Key
The Add OpenRouter API Key dialog opens.
2
Enter a label if you want one
The Label (optional) field names the key on the card, for example Production.
3
Paste the key into OpenRouter API Key
The field hides the key. Select the eye icon to show or hide it while you check it.
4
Tick the acknowledgement
The checkbox reads I understand TARS will use this key for all model calls in this org.
5
Select Validate & Save
The button reads Validating… while Tars checks the key with OpenRouter. On success a toast reads OpenRouter key saved (…1234).
sk-or-, or that OpenRouter rejects, is not saved and the dialog shows the error. If OpenRouter cannot be reached, nothing is saved either, so try again later.
Your organization holds one OpenRouter key at a time. Saving a key when one already exists replaces it.
Read the key card
Once a key is saved, the OpenRouter card shows an Active badge and a one-row table.
Below the table sit two buttons, Replace Key and Revoke.
Replace the key
Select Replace Key to rotate to a new key. The Replace OpenRouter Key dialog has the same fields, checkbox, and Validate & Save button as the add dialog. The new key is validated the same way, and on success it takes over immediately while the old key is discarded. There is no gap in which model calls fail, so rotate whenever your OpenRouter account requires it.Revoke the key
Select Revoke to open the confirmation dialog, which is titled Revoke OpenRouter key? and repeats that warning. Select Revoke key to confirm. A toast reads OpenRouter key revoked, and the tab returns to the empty OpenRouter card. Model calls go back to the Tars key.When the key fails
If a recent model call failed because OpenRouter rejected your key, a red alert appears above the card. It reads Your OpenRouter key returned an error (HTTP_401) on the last request, with the code OpenRouter returned. A second line reads Model calls routed through your key error out until it is updated. The alert has two buttons:- Update Key opens the Replace OpenRouter Key dialog.
- Revoke Key opens the Revoke OpenRouter key? confirmation.
What changes when a key is active
- Every model call from your agents’ AI Agent gambits, in the builder preview and in live conversations, is sent to OpenRouter with your key. OpenRouter bills those calls to your account. Your Tars plan and conversation usage do not change.
- In the builder, the model picker in the Model region shows a BYOK · OpenRouter banner with the last four characters of the key. The banner also has a Manage link back to the Model Provider tab. When a model outside the curated list is selected, the picker also shows a small BYOK badge next to the model name.
- The key does not change which models the picker offers. Premium and Enterprise plans already offer the full catalog. See Plans overview.
- The key is stored encrypted and is decrypted only for the request being made. It is never shown again after you save it, only its last four characters. See How Tars protects files, data, and identity.
