Integration Methods
Proxy Integration
Route requests through Helicone’s proxy. Simple setup with minimal code changes.
AI Gateway
Use the AI Gateway for access to multiple providers including OpenAI.
Async Logging
Zero-latency logging using OpenLLMetry. No proxy required.
Azure OpenAI
Special integration for Azure-hosted OpenAI models.
Quick Start
Get your API keys
You’ll need:
- Your OpenAI API key from platform.openai.com
- Your Helicone API key from helicone.ai/developer
Update your base URL
Change the base URL to route requests through Helicone:
- TypeScript/JavaScript
- Python
- cURL
View your logs
All requests are now logged to your Helicone dashboard.
Streaming Support
Helicone fully supports OpenAI streaming:- TypeScript/JavaScript
- Python
Custom Properties
Track custom metadata with your requests:Session Tracking
Track multi-turn conversations and agent workflows:Response Caching
Reduce costs and latency with response caching:Rate Limiting
Control usage per user or API key:Function Calling
Helicone fully supports OpenAI function calling:Vision Models
Use GPT-4 Vision with Helicone:Embeddings
Track embedding requests:Azure OpenAI
Integrate with Azure-hosted OpenAI:Error Tracking
Helicone automatically tracks errors and retry attempts:- Error message and type
- Request parameters
- Retry attempts
- User and session context
Zero-Latency Integration
For production applications where latency is critical, use async logging:Best Practices
Use environment variables for API keys
Use environment variables for API keys
Never hardcode API keys. Use environment variables:
Track users and sessions
Track users and sessions
Always include user and session IDs for better observability:
Use custom properties
Use custom properties
Add context with custom properties:
Enable caching for repeated queries
Enable caching for repeated queries
Reduce costs with caching:
Troubleshooting
Requests not showing in dashboard
Requests not showing in dashboard
- Verify your Helicone API key is correct
- Check that the
Helicone-Authheader is formatted correctly:Bearer sk-helicone-... - Ensure you’re using the correct base URL:
https://oai.helicone.ai/v1 - Check your network allows connections to helicone.ai
Authentication errors
Authentication errors
- Make sure you’re passing your OpenAI API key (not Helicone key) as the
apiKey - Pass your Helicone API key in the
Helicone-Authheader - Format:
Helicone-Auth: Bearer sk-helicone-...
Increased latency
Increased latency
- Helicone proxy adds ~20-50ms latency
- For zero-latency, use async logging
- Check your geographic region - we have global endpoints
Next Steps
Session Tracking
Track multi-turn conversations
Custom Properties
Add custom metadata
Response Caching
Reduce costs with caching
Prompt Management
Version and deploy prompts
