Skip to main content

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

1
Create a .env file in your project:
2

Install Langfuse packages

3

Create a Langfuse OpenAI client using Helicone

Use Langfuse’s OpenAI client wrapper with Helicone’s base URL:
4

Make requests with Langfuse tracing

Your existing Langfuse code continues to work without any changes:
5
  • 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

AI Gateway Overview

Learn about Helicone’s AI Gateway features and capabilities

Provider Routing

Configure intelligent routing and automatic failover

Model Registry

Browse all available models and providers

Custom Properties

Add metadata to track and filter your requests

Sessions

Track multi-turn conversations and user sessions

Rate Limiting

Configure rate limits for your applications