1

Create an account + Generate an API Key

Log into www.helicone.ai 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 API base and add the `Helicone-Auth` header

const llm = new ChatAnthropic({
  modelName: "claude-2",
  anthropicApiKey: "ANTHROPIC_API_KEY",
  clientOptions: {
    baseURL: "https://anthropic.hconeai.com/",
    defaultHeaders: {
      "Helicone-Auth": `Bearer HELICONE_API_KEY`,
    },
  },
});