Skip to main content

Set up model API keys

Testronaut uses credentials from the model providers directly. Create keys only through each provider's official console, keep them out of source control, and review that provider's billing and usage limits.

ProviderCreate or manage keysOfficial documentationTestronaut variable
OpenAIOpenAI API keysOpenAI API quickstartOPENAI_API_KEY
Anthropic ClaudeClaude Platform API keysClaude API getting startedANTHROPIC_API_KEY
Google GeminiGoogle AI Studio API keysUsing Gemini API keysGEMINI_API_KEY
Jev / TypeSafe AITypeSafe AI API consoleJev API referenceTESTRONAUT_JEV_API_KEY

Add the keys you use to the project's .env file:

# Choose one execution-model provider.
OPENAI_API_KEY=
# ANTHROPIC_API_KEY=
# GEMINI_API_KEY=

# Optional, only when opting in to Jev guardrails.
TESTRONAUT_JEV_API_KEY=

Do not commit .env. Provider API access is separate from a ChatGPT, Claude, or Gemini consumer subscription, and may require API billing to be enabled in the corresponding developer account.

After configuration, run testronaut config --json. It reports the selected execution provider and whether a Jev credential was detected, but never prints secret values.