Integrating with Helicone

Last updated:

|Edit this page

This feature is currently in public beta. This means it's not yet a perfect experience, but we'd love to know your thoughts. Please share your feedback and follow our roadmap.

You can integrate with Helicone and bring data into PostHog for analysis. Additionally, we offer a dashboard template to help you quickly get insights into your LLM product.

Integrating with Helicone

  1. Sign up for Helicone and add it to your app.
  2. Similar to how you set Helicone-Auth header when configuring your LLM client, add two new headers Helicone-Posthog-Key and Helicone-Posthog-Host with your PostHog host and API key (you can find these in your PostHog project settings):
client = OpenAI(
api_key="your-api-key-here", # Replace with your OpenAI API key
base_url="https://oai.hconeai.com/v1", # Set the API endpoint
default_headers= {
"Helicone-Auth": f"Bearer {HELICONE_API_KEY}",
"Helicone-Posthog-Key": "<ph_project_api_key>",
"Helicone-Posthog-Host": "<ph_client_api_host>",
}
)

Helicone events will now be exported into PostHog as soon as they're available.

Using the Helicone dashboard template

Once you've installed the integration, dashboard templates help you quickly set up relevant insights. You can see an example Helicone dashboard here.

To create your own dashboard from a template:

  1. Go the dashboard tab in PostHog.
  2. Click the New dashboard button in the top right.
  3. Select LLM metrics – [name of the integration you installed] from the list of templates.

Questions?

Was this page useful?