Integration Methods
Provider Configuration
Configure AI SDK providers to route through Helicone.
AI Gateway
Use the AI Gateway for unified access to all providers.
Custom Headers
Add Helicone headers to track sessions and custom properties.
Async Logging
Zero-latency logging for production apps.
Quick Start
Streaming Chat
Integrate Helicone with Next.js API routes:Session Tracking
Track multi-turn conversations with session IDs:Custom Properties
Add custom metadata to track important context:Tool Calling
Helicone tracks tool calls with full visibility:AWS Bedrock
Use Vercel AI SDK with AWS Bedrock through Helicone:Response Caching
Reduce costs with response caching:Object Generation
Track structured object generation:Streaming Objects
Stream structured data generation:Multi-Modal (Vision)
Use vision models with Helicone:Rate Limiting
Control usage per user:Best Practices
Always include session IDs
Always include session IDs
Track conversations with session IDs:
Use custom properties for filtering
Use custom properties for filtering
Add context for better organization:
Track tool usage
Track tool usage
Label requests that use tools:
Enable caching for repeated queries
Enable caching for repeated queries
Reduce costs with caching:
Server Actions
Use Helicone with Next.js Server Actions:Troubleshooting
Requests not appearing in dashboard
Requests not appearing in dashboard
- Verify your Helicone API key is correct
- Check the
Helicone-Authheader format:Bearer sk-helicone-... - Ensure you’re passing headers to the provider config, not the individual function
- Check browser network tab for failed requests
Streaming not working
Streaming not working
- Ensure your Next.js API route returns
result.toDataStreamResponse() - Check that streaming is enabled in your deployment platform
- Verify no middleware is buffering the response
Session tracking not working
Session tracking not working
- Session IDs must be consistent across requests
- Pass session ID from client to API route
- Use UUIDs or unique strings for session IDs
Headers not being sent
Headers not being sent
Headers should be in the provider configuration:
Next Steps
AI Gateway
Use multiple providers with automatic fallbacks
Session Tracking
Track multi-turn conversations
Custom Properties
Add custom metadata
Response Caching
Reduce costs with caching
