API Keys & Auth

gptcgt offers two ways to power its AI models. You choose which approach fits your workflow — or use both.

Option 1: Bring Your Own Keys (BYOK) — Free

Supply your own API keys from any supported provider. gptcgt stores them securely in your operating system's native keychain (macOS Keychain, Windows Credential Locker, Linux Secret Service) via the keyring Python library. Keys never touch disk in plaintext.

Supported Providers

ProviderEnv VariableNotable Models
OpenAIOPENAI_API_KEYGPT-4o, o3, o1
AnthropicANTHROPIC_API_KEYClaude 3.5 Sonnet, Claude 3 Opus
GoogleGEMINI_API_KEYGemini 2.5 Pro, Gemini 2.5 Flash
DeepSeekDEEPSEEK_API_KEYDeepSeek V3, DeepSeek Coder
xAIXAI_API_KEYGrok 2
MistralMISTRAL_API_KEYMistral Large
GroqGROQ_API_KEYLLaMA 3 (ultra-fast inference)
CohereCOHERE_API_KEYCommand R+
OpenRouterOPENROUTER_API_KEYAccess to 200+ models via one key
CustomCUSTOM_API_KEYOllama, vLLM, any OpenAI-compatible API

Pros: Only pay providers directly. Total privacy. No subscription needed.

Cons: You manage rate limits and billing across multiple providers yourself. Ensemble/Architect modes require keys from multiple providers.

BYOK Safety Limits

Even with your own keys, gptcgt enforces spend protection:

# In ~/.gptcgt/global.toml
daily_spend_limit = 10.0    # $10/day hard stop
max_spend_per_task = 2.0    # $2 max per individual task
max_tokens_per_task = 500000 # 500K token cap per task

Option 2: Managed Credits (Subscription)

Sign up for gptcgt Pro and get a single bucket of Credits that work seamlessly across all providers. We handle API keys, routing, rate limiting, and billing through our LiteLLM proxy.

  1. Type /login in the app to start the WorkOS device flow
  2. Authorize in your browser
  3. You're in — credits are automatically used for all tasks

Credit Costs by Mode

ModeCredits~ Dollar Cost
Scout1~$0.01
Standard5~$0.05
Ensemble / Battle25~$0.25
Architect100~$1.00

Key Commands

  • /login — Authenticate with your gptcgt account
  • /logout — Sign out
  • /credits — Check your remaining balance
  • /billing — Open the web dashboard for subscription management

Verifying Key Health

Run /status at any time to check the health and latency of all configured providers. gptcgt will test each API key with a minimal health-check request using the cheapest available model for that provider.