Skip to content

Provider Keys

To use TokenRouter, you need to provide API keys for the AI providers you want to use. TokenRouter supports two methods:

  1. Console Configuration (Recommended) - Store encrypted keys in the console
  2. Inline Headers - Pass keys directly in requests
ProviderModelsGet API Key
OpenAIGPT-4o, GPT-4 Turboplatform.openai.com
AnthropicClaude 3.7 Sonnet, Opus, Haikuconsole.anthropic.com
GoogleGemini 1.5 Pro, Flashmakersuite.google.com
MistralMistral Large, Mediumconsole.mistral.ai
DeepSeekDeepSeek V3platform.deepseek.com
MetaLlama 4llama.meta.com (special access)
  1. Go to Console → Providers
  2. Click Add Provider
  3. Select provider (OpenAI, Anthropic, etc.)
  4. Paste your API key
  5. Click Save

Keys are encrypted and never exposed in logs.

Pass provider keys directly in request headers:

const response = await client.responses.create({
model: 'gpt-4o',
input: 'Hello!'
}, {
headers: {
'X-OpenAI-Key': process.env.OPENAI_API_KEY
}
});
  • X-OpenAI-Key - OpenAI
  • X-Anthropic-Key - Anthropic
  • X-Gemini-Key - Google Gemini
  • X-Mistral-Key - Mistral
  • X-DeepSeek-Key - DeepSeek