Introduction#
Langfuse is an open-source LLM observability and analytics platform that provides tracing, monitoring, and analytics for LLM applications.
This integration requires only two changes to your existing Langfuse code - updating the base URL and API key.
Integration Steps#
Create an account and generate an API key
Create a .env file in your project:
Install Langfuse packages
Create a Langfuse OpenAI client using Helicone
Use Langfuse's OpenAI client wrapper with Helicone's base URL:
Make requests with Langfuse tracing
Your existing Langfuse code continues to work without any changes:
View requests in the Helicone dashboard
- Request/response bodies
- Latency metrics
- Token usage and costs
- Model performance analytics
- Error tracking
- LLM traces and spans in Langfuse
- Session tracking
While you're here, why not give us a star on GitHub? It helps us a lot!
Complete Working Example#
Streaming Responses#
Langfuse supports streaming responses with full observability:
Nested Example#
Related Documentation#
Learn about Helicone's AI Gateway features and capabilities
Configure intelligent routing and automatic failover
Browse all available models and providers
Add metadata to track and filter your requests
Track multi-turn conversations and user sessions
Configure rate limits for your applications
