Skip to main content
Helicone OSS LLM Observability

Langfuse Integration

Integrate Helicone AI Gateway with Langfuse to access 100+ LLM providers with observability and LLM tracing.
2 min read

Introduction#

Langfuse is an open-source LLM observability and analytics platform that provides tracing, monitoring, and analytics for LLM applications.

Note

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

Log into Helicone or create an account. Once you have an account, you can generate an API key here.

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:

You can find all 100+ supported models at helicone.ai/models.

View requests in the Helicone dashboard

All your Langfuse requests are now visible in your Helicone dashboard.
  • Request/response bodies
  • Latency metrics
  • Token usage and costs
  • Model performance analytics
  • Error tracking
  • LLM traces and spans in Langfuse
  • Session tracking
Tip

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#