1

Create an account + Generate an API Key

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

2

Set HELICONE_API_KEY as an environment variable

export HELICONE_API_KEY=<your API key>
3

Modify the base path and add a Helicone-Auth header

Package Integration

1

Create an account + Generate an API Key

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

2

Set HELICONE_API_KEY as an environment variable

export HELICONE_API_KEY=<your API key>
3

Install the Helicone package

pip install helicone
4

Modify OpenAI import to use Helicone

from helicone.openai_proxy import openai # replace `import openai` with this line
5

That's it! You're ready to start logging with Helicone. Here's an example of using Helicone along with our advanced features as parameters

import OpenAI from "openai";

const openai = new OpenAI({
    apiKey: request.env.OPENAI_API_KEY,
    baseURL: "https://oai.helicone.ai/v1",
    defaultHeaders: {
        "Helicone-Auth": `Bearer ${request.env.HELICONE_API_KEY}`,
    },
});