Assistant Billing

Providers

Configure providers in the dashboard under Providers or via the SDK.

Popular Providers

ProviderIDCredentialsExample Models
OpenAIopenaiOPENAI_API_KEYgpt-4o, gpt-4o-mini, o1, o3-mini
AnthropicanthropicANTHROPIC_API_KEYclaude-sonnet-4-20250514, claude-3.5-haiku
Google AI StudiogoogleGOOGLE_GENERATIVE_AI_API_KEYgemini-2.0-flash, gemini-1.5-pro
DeepSeekdeepseekDEEPSEEK_API_KEYdeepseek-chat, deepseek-reasoner
MistralmistralMISTRAL_API_KEYmistral-large, mistral-small
Grok (xAI)xaiXAI_API_KEYgrok-2, grok-3
GroqgroqGROQ_API_KEYllama-3.3-70b, mixtral-8x7b
DeepgramdeepgramDEEPGRAM_API_KEYaura, aura-2, flux, nova-3
ElevenLabselevenlabsELEVENLABS_API_KEYeleven_flash_v2, eleven_v3, scribe_v2
CartesiacartesiaCARTESIA_API_KEYsonic-3.6, ink-whisper
Azure OpenAIazureAZURE_RESOURCE_NAME, AZURE_API_KEYgpt-4o (Azure deployments)
Amazon Bedrockamazon-bedrockAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AWS_BEARER_TOKEN_BEDROCKclaude-3, titan
OpenRouteropenrouterOPENROUTER_API_KEYAny model via OpenRouter

All Providers

ProviderIDRequired Credentials
OpenAIopenaiOPENAI_API_KEY
AnthropicanthropicANTHROPIC_API_KEY
Google AI StudiogoogleGOOGLE_GENERATIVE_AI_API_KEY
Google Vertex AIgoogle-vertexGOOGLE_VERTEX_PROJECT, GOOGLE_VERTEX_LOCATION, GOOGLE_APPLICATION_CREDENTIALS
Azure OpenAIazureAZURE_RESOURCE_NAME, AZURE_API_KEY
Amazon Bedrockamazon-bedrockAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AWS_BEARER_TOKEN_BEDROCK
MistralmistralMISTRAL_API_KEY
GroqgroqGROQ_API_KEY
DeepgramdeepgramDEEPGRAM_API_KEY
DeepSeekdeepseekDEEPSEEK_API_KEY
Grok (xAI)xaiXAI_API_KEY
PerplexityperplexityPERPLEXITY_API_KEY
CoherecohereCOHERE_API_KEY
OpenRouteropenrouterOPENROUTER_API_KEY
CerebrascerebrasCEREBRAS_API_KEY
BasetenbasetenBASETEN_API_KEY
Hugging FacehuggingfaceHF_TOKEN
Adobe Fireflyadobe-fireflyFIREFLY_SERVICES_CLIENT_ID, FIREFLY_SERVICES_CLIENT_SECRET
CartesiacartesiaCARTESIA_API_KEY
ElevenLabselevenlabsELEVENLABS_API_KEY
Fal AIfalFAL_KEY
IdeogramideogramIDEOGRAM_API_KEY
ParallelparallelPARALLEL_API_KEY
ReplicatereplicateREPLICATE_API_TOKEN

OpenAI serves speech, transcription, and translation with OPENAI_API_KEY. Groq serves speech with its Orpheus models (WAV only), transcription, and translation with GROQ_API_KEY. Deepgram serves speech with aura, aura-2, and flux, plus transcription with nova-3 and nova-3-multi. ElevenLabs serves speech with eleven_flash_v2, eleven_flash_v2_5, eleven_multilingual_v2, and eleven_v3, plus transcription with scribe_v2. Cartesia serves speech with sonic-3.6 and transcription with ink-whisper. These three vendors require their own provider keys; voice in a speech request carries the selected vendor's voice ID or name. See Audio for response formats and billing units.

Aggregator Accounts

An aggregator delivers other providers' models under one key. Connecting one lets the gateway serve models whose provider you have not configured, on your account instead of the platform's.

AggregatorIDCredentialsServes
Vercel AI GatewayvercelAI_GATEWAY_API_KEYListed catalog models on chat completions, responses, messages, embeddings, image generation, speech, and transcription
OpenRouteropenrouterOPENROUTER_API_KEYIts own listings and catalog models it lists on chat completions, completions, speech, and transcription

A provider key of your own takes precedence: with an OPENAI_API_KEY configured, OpenAI models go to OpenAI directly whether or not an aggregator is connected.

Fish Audio speech models such as s1 and Microsoft voices such as mai-voice-2 are reachable only through Vercel AI Gateway. Audio on a project's Vercel AI Gateway or OpenRouter account uses that account. Vercel AI Gateway does not serve streaming speech or transcription through these endpoints, and translation requires an OpenAI or Groq provider key.

Add a Provider

Dashboard

  1. Go to Providers in your project dashboard
  2. Click Add Provider
  3. Select the provider and enter credentials
  4. Enable the models you want to offer

SDK (BYOK)

Customers can add their own provider credentials:

// Set credentials
await billing.providerKeys.set('openai', {
  OPENAI_API_KEY: 'sk-proj-...',
});
 
// Test credentials
const result = await billing.providerKeys.test('openai');
// -> { valid: true }

See Provider Keys for the full API.

Provider Routing

When multiple providers offer the same model, the gateway selects based on your routing strategy:

StrategyBehaviorStatus
priorityUse highest-priority provider (default)Available
round-robinRotate across providersPlanned
weightedDistribute by assigned weightsPlanned
latency-basedUse fastest providerPlanned
cost-optimizedUse cheapest providerPlanned

Configure routing strategies per model route in the dashboard under Rules. Currently, priority is the active strategy -- additional strategies are planned for a future release.

BYOK Priority

When a customer sets their own provider key via the SDK, their key is stored at the workspace level. The intended resolution order is:

  1. Operator key (project-level) -- primary credentials, normal billing applies
  2. Platform provider -- if no project credentials available

Customer workspace-level key priority is planned for a future release. Currently, customers can manage their provider keys via the SDK, but the gateway resolves credentials from the project-level operator configuration.

Credentials

All provider credentials are encrypted at rest using AES-256-GCM. The encryption key is configured via the ENCRYPTION_KEY environment variable.

Credentials are stored as flexible key-value objects. Each provider requires specific credential fields (listed above). The gateway resolves the API key from credentials in this order:

  1. Provider-specific field (e.g., OPENAI_API_KEY)
  2. Generic API_KEY field
  3. First credential value