Skip to main content
Helicone OSS LLM Observability

PostHog Integration

Integrate Helicone AI Gateway with PostHog to automatically export LLM request events to your PostHog analytics platform for unified product analytics.
1 min read

Introduction#

PostHog is a comprehensive product analytics platform that helps you understand user behavior and product performance.

How to Integrate#

Create an account and generate an API key

Sign up at helicone.ai and generate an API key.

Create a Posthog account if you don't have one. Get your Project API Key from your PostHog project settings.

Install OpenAI

Configure OpenAI client with Helicone AI Gateway

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

Use the OpenAI SDK

Your existing OpenAI code continues to work without any changes. Events will automatically be exported to PostHog.

Verify your requests in Helicone

With the above setup, any calls to Posthog will automatically be logged and monitored by Helicone. Review them in your Helicone dashboard.
  1. Go to your PostHog Events page
  2. Look for events with the helicone_request event name
  3. Each event contains metadata about the LLM request including:
    • Model used
    • Token counts
    • Latency
    • Cost
    • Request/response data
Tip

While you're here, why not give us a star on GitHub? It helps us a lot!

Info

Looking for a framework or tool not listed here? Request it here!