Quick Start
Get started with Helicone AI Gateway in three simple steps:1
Get Your API Key
Sign up at helicone.ai/signup and get your API key from the dashboard.
If using Pass-Through Billing, add credits at helicone.ai/credits
2
Update Your Code
Change your
baseURL to point to Helicone’s AI Gateway:3
Make Requests
Use any model from 20+ providers:
You’re all set! View your requests at helicone.ai/dashboard
Examples by Language
- TypeScript/Node.js
- Python
- cURL
Authentication Methods
Pass-Through Billing (PTB)
Use Helicone’s API key and billing for all providers:- Helicone API key
- Credits added to your account (add credits)
- Single API key for all providers
- Consolidated billing
- No provider setup needed
Bring Your Own Key (BYOK)
Use your own provider API keys with Helicone:1
Add Provider Keys
Go to Settings → API Keys and add your provider keys:
- OpenAI API key
- Anthropic API key
- Google API key
- AWS credentials (for Bedrock)
- Other provider keys
2
Use Helicone API Key
Your requests automatically use BYOK when available:
- Use existing provider credits
- Direct provider billing
- BYOK attempts prioritized over PTB
- Automatic fallback to PTB if BYOK fails
The AI Gateway automatically prioritizes BYOK over PTB attempts. Learn more in Routing.
Model Formats
The AI Gateway supports multiple model naming formats:- Model Only
- Model with Provider
- With Fallbacks
- With Provider Exclusions
Specify just the model name for automatic provider routing:The gateway automatically:
- Tries BYOK providers first
- Falls back to PTB if needed
- Selects based on cost and availability
Discovering Models
Use the/v1/models endpoint to discover available models:
Configuration Headers
Customize gateway behavior with optional headers:string
default:"OPENAI"
Control request/response format mapping:
OPENAI: Map to OpenAI format (default)RESPONSES: Use OpenAI Responses API formatNO_MAPPING: Pass through native provider format
string
Associate requests with a Stripe customer for metering
Example with Headers
Streaming Responses
Streaming works the same as with native providers:Error Handling
The gateway returns standard OpenAI-compatible error responses:Next Steps
Routing
Learn how requests are routed across providers
Fallbacks
Configure automatic failover for reliability
Prompt Integration
Use prompts stored in Helicone
Integrations
Integrate with frameworks and tools
