Fast path: a decision API key
Routine decisions are made by the fast path, a decision model, which needs one API key: TypeSafe, OpenRouter, Gemini or OpenAI.
Overview#
Routine decisions are made by the fast path, a decision model, which needs one API key from any of four labs: TypeSafe (Jev), OpenRouter, Google (Gemini) or OpenAI. With several keys set, the runtime uses all of them as a failover chain, TypeSafe first, then OpenRouter, Gemini and OpenAI. Without a key you can still run everything with the offline baseline (--provider keyword), but that is a deterministic demo baseline, not the decision model.
- Create a key with one lab: TypeSafe (typesafe.ai), OpenRouter, Google AI Studio or OpenAI. The examples below use TypeSafe; the others are OPENROUTER_API_KEY, GEMINI_API_KEY and OPENAI_API_KEY.
- Store it in the environment — pick one of the options below.
- Verify with
mlola browser config check: every provider in the chain is asked one probe question and should answer CLICK 2.
export TYPESAFE_API_KEY="tsk_..."
mlola browser doctor
echo 'export TYPESAFE_API_KEY="tsk_..."' >> ~/.zshrc
source ~/.zshrc
TYPESAFE_API_KEY="tsk_..." npx @mlola/browser-cli browser run \
--goal "Download my latest invoice" \
--url https://billing.example.com/invoices
# .env
echo 'TYPESAFE_API_KEY=tsk_...' > .env
node --env-file=.env ./node_modules/.bin/mlola browser run --goal "..."
mlola browser config init # writes mlola.config.json
mlola browser config show # what the file says + what actually resolved
# with only an OpenRouter, Gemini or OpenAI key, there is nothing else to set:
export OPENAI_API_KEY=...
mlola browser run --goal "Download my latest invoice" --url https://...
Overriding the endpoint or model#
| Variable | Default | Purpose |
|---|---|---|
| TYPESAFE_API_KEY | — | Jev credential: one decision key (OPENROUTER_API_KEY, GEMINI_API_KEY or OPENAI_API_KEY also work) |
| MLOLA_JEV_BASE_URL | https://api.typesafe.ai | API base URL |
| MLOLA_JEV_MODEL | jev-latest | Model id sent in the request |
| MLOLA_JEV_TIMEOUT_MS | 20000 | Per-request timeout |
Choosing the decision provider#
mlola browser run --provider typesafe … # fast path (needs a key)
mlola browser run --provider keyword … # offline baseline, no key required