A rule for each need
Rules run top to bottom, and the first rule that matches a call decides. A rule can match on the API key or the project, among other conditions. Keep a rule, with a key of its own, for each way you want work done. Then start each run with the key whose rule you want.
GPT-5 does a run started with the
runs-gpt key. A run started with runs-trial draws its model from the split. A regulated project stays on Sensei whatever key starts the run, because its rule is first.
Set it up
- Connect a provider key and enable the models runs may use. See Provider keys.
- Create a Sensei key for the runs. See Create a key.
- Open Routing and click Add rule. Under When, pick API key and the key you created. Under Route, pick a model or a split.
- Start runs with that key.
- Terminal
- Python
- JavaScript
- API
- Chat tool
sensei login saves a key for every command that follows.Runs started without your key
Some runs start without a key of yours, and are given a key made for that run alone:- a run started from the dashboard
- a run started by a schedule
- a run started from a chat tool you signed in to, instead of giving it a key
Splits, attempts and results
A split draws a model once for each attempt of a run. Every step of an attempt is done by the model it drew. A run with several attempts can try different models. A rule that adapts on results counts a run’s verdict. A verified run is a success for the model that did it, and a run that broke a test that passed before is a failure. A run that is not verified counts for neither. If your provider key is missing or rejected, the call moves to the rule’s fallback and ends on Sensei, so the run carries on. If the provider’s rate limit is reached, the run waits and asks again, as it does when Sensei is busy.See which model did the work

Cost and data
The provider bills the tokens of calls on your key. Sensei charges for those calls by the request, as on Provider keys, and charges the run’s computer time as for any run. A run’s cost figure and its spend limit price every model call at Sensei’s token rates, including calls on your key. So a run on your key can reach its spend limit before it has cost you that much. If it stops early, give it a higher limit with--budget.
The content of calls on your key is never kept for your model. The version of Sensei trained on your project learns only from the calls Sensei answers. See Provider keys.
A model named on the run
A run takes its model from your rules, not from the request. Amodel other than Sensei in the request is refused with invalid_model. To use another model, start the run with a key whose rule sends it there.