Choose your platform below to get started with LLM analytics installation.
Install LLM analytics with PostHog
Last updated:
|Questions? Ask Max AI.
It's easier than reading through 814 pages of documentation
Community questions
Was this page useful?
Next article
OpenAI LLM analytics installation
Setting up analytics starts with installing the PostHog SDK for your language. LLM analytics works best with our Python and Node SDKs. Install the OpenAI SDK: Initialize PostHog with your project API key and host from your project settings , then pass it to our OpenAI wrapper. Note: This also works with the AsyncOpenAI client. Now, when you use the OpenAI SDK to call LLMs, PostHog automatically captures an $ai_generation event. You can enrich the event with additional data such as the…