Setup
When you provide only a Browserbase API key (without a provider-specific key), Stagehand automatically routes model requests through Model Gateway. No additional configuration needed.Node.js
model to let Model Gateway select one for each act, extract, and observe call. See Stagehand model configuration to pin a model or bring your own provider.
Model Gateway requires Browserbase-hosted browsers. It does not work with local browsers.
Switching models
With Model Gateway, switching between providers is a config change. No new accounts, API keys, or code rewiring required:- OpenAI
- Anthropic
- Google
Node.js
Key benefits
- One key, one bill: LLM inference, browser infrastructure, and caching all run through your Browserbase API key. No separate provider accounts to manage.
- Market-price tokens: Tokens are billed at the same price as going direct to the provider. No markup.
- Built-in reliability: Retries, backoff, and rate limit handling are managed for you.
- No tier-gating: Access new models immediately without hitting provider spend thresholds. No need to “earn” access to the latest releases.
- Action caching: Model Gateway works with Stagehand’s managed action caching, so repeated steps are reused instead of re-run, reducing cost and latency across sessions.
Supported providers
Pricing
Model Gateway tokens are billed at market price, the same rate you’d pay going direct to the provider. There is no additional markup. Usage appears on your existing Browserbase bill alongside browser time, proxy bandwidth, and other platform usage. See Plans for details on included allocations and overages.Next steps
Stagehand
The AI SDK for browser agents. Natural language selectors, self-healing actions, and built-in caching.
Agents
Configure, deploy and run managed agents on Browserbase.