> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lytix.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Helicone

> Start using your LLM events from Helicone

<Info>
  **Prerequisite** Please see [here](/api-key-setup) to get and set your API Key environment variable.
</Info>

Integrating with Helicone is as simple as updating your headers on your OpenAI client. See examples in JS and PY.

<CodeGroup>
  ```ts JavaScript Example
  import { Configuration, OpenAIApi } from "openai";

  const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
  basePath: "https://oai.helicone.ai/v1",
  baseOptions: {
  	headers: {
  		"Helicone-Auth": `Bearer $HELICONE_API_KEY`,
  		"Helicone-Lytix-Key": `$LYTIX_API_KEY`,
  	},
  },
  });

  const openai = new OpenAIApi(configuration);
  ```

  ```py Python Example
  client = OpenAI(
  	api_key="<your-api-key-here>", # Replace with your OpenAI API key
  	base_url="https://oai.helicone.ai/v1" # Set the API endpoint
  	default_headers= {
  		"Helicone-Auth": f"Bearer $HELICONE_API_KEY",
  		"Helicone-Lytix-Key": "$LYTIX_API_KEY",
  	}
  )
  ```
</CodeGroup>

Then just use Helicone as normal and you'll see your events in your Lytix dashboard under the name of the model you use.

![title](https://mintlify.s3-us-west-1.amazonaws.com/lytix/images/integrations/helicone-lytix-final.png)

## User Identifier

You can also add the `Helicone-User-Id` to get userId information in your Lytix dashboard. This is useful if you want to see how a specific user is using your models.

<CodeGroup>
  ```ts JavaScript Example
  import { Configuration, OpenAIApi } from "openai";

  const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
  basePath: "https://oai.helicone.ai/v1",
  baseOptions: {
  	headers: {
  		"Helicone-Auth": `Bearer $HELICONE_API_KEY`,
  		"Helicone-Lytix-Key": `$LYTIX_API_KEY`,
          "Helicone-User-Id": `$USER_ID`, // Add this
  	},
  },
  });

  const openai = new OpenAIApi(configuration);
  ```

  ```py Python Example
  client = OpenAI(
  	api_key="<your-api-key-here>", # Replace with your OpenAI API key
  	base_url="https://oai.helicone.ai/v1" # Set the API endpoint
  	default_headers= {
  		"Helicone-Auth": f"Bearer $HELICONE_API_KEY",
  		"Helicone-Lytix-Key": "$LYTIX_API_KEY",
          "Helicone-User-Id": "$USER_ID", # Add this
  	}
  )
  ```
</CodeGroup>

You can now see the user identifier property in your Lytix dashboard.

![title](https://mintlify.s3-us-west-1.amazonaws.com/lytix/images/integrations/heli-user-id.png)

## EU Servers

If you are using the EU servers via Helicone. You will need to set the `Helicone-Lytix-Host` to `https://eu.api.lytix.co`.

<CodeGroup>
  ```ts JavaScript Example
  import { Configuration, OpenAIApi } from "openai";

  const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
  basePath: "https://oai.helicone.ai/v1",
  baseOptions: {
  	headers: {
  		"Helicone-Auth": `Bearer $HELICONE_API_KEY`,
  		"Helicone-Lytix-Key": `$LYTIX_API_KEY`,
    		"Helicone-Lytix-Host": "https://eu.api.lytix.co", # Add this
  	},
  },
  });

  const openai = new OpenAIApi(configuration);
  ```

  ```py Python Example
  client = OpenAI(
  	api_key="<your-api-key-here>", # Replace with your OpenAI API key
  	base_url="https://oai.helicone.ai/v1" # Set the API endpoint
  	default_headers= {
  		"Helicone-Auth": f"Bearer $HELICONE_API_KEY",
  		"Helicone-Lytix-Key": "$LYTIX_API_KEY",
          "Helicone-Lytix-Host": "https://eu.api.lytix.co", # Add this
  	}
  )
  ```
</CodeGroup>
