Skip to main content
FinalRun uses a bring-your-own-key (BYOK) model — it does not proxy AI requests through its own infrastructure. When you run a test, the CLI calls your chosen AI provider directly using the API key you supply. This gives you full visibility into token usage and billing, and lets you use whichever model tier your team has access to.

Supported providers

Provider prefixEnvironment variableRecommended model family
google/...GOOGLE_API_KEYGemini 3 family and above
openai/...OPENAI_API_KEYGPT-5 family and above
anthropic/...ANTHROPIC_API_KEYClaude Sonnet 4 / Opus 4 and above
The provider is inferred from the prefix of the --model value or the model field in .finalrun/config.yaml.

Setting your API key

You can supply an API key in three ways:
Add the key to a .env file at your workspace root. This is the recommended approach for local development.
echo "GOOGLE_API_KEY=your-key-here" > .env
The file is read automatically on every run. See Managing environments and secrets for dotenv load order details.

Setting a default model

Add a model field to .finalrun/config.yaml so you don’t need to pass --model on every command:
.finalrun/config.yaml
model: google/gemini-3-flash-preview
The model value must use provider/model-name format. Examples: google/gemini-3-flash-preview, anthropic/claude-sonnet-4-6, openai/gpt-5.
Set model in .finalrun/config.yaml once during workspace setup. After that, commands like finalrun test smoke.yaml --platform android work without an explicit --model flag.

Provider setup examples

echo "GOOGLE_API_KEY=your-key-here" > .env
finalrun test smoke.yaml --platform android --model google/gemini-3-flash-preview
Test runs consume AI provider tokens. Standard API billing from your provider applies — FinalRun does not add any markup or usage fees on top of provider costs.