You can seamlessly integrate Helicone with the OpenAI compatible models that are deployed on Hyperbolic.

The integration process closely mirrors the proxy approach. The only distinction lies in the modification of the base_url to point to the dedicated Hyperbolic endpoint https://hyperbolic.helicone.ai/v1.

base_url="https://hyperbolic.helicone.ai/v1"

Please ensure that the base_url is correctly set to ensure successful integration.

Proxy Example

The integration process closely mirrors the proxy approach. More docs available there.

1

Create Helicone account + Generate an API Key

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

2

Create Hyperbolic account + Retrieve an API Key

Log into app.hyperbolic.xyz or create an account. Once you have an account, you can retrieve your API key.

3

Set HELICONE_WRITE_API_KEY as an environment variable

Helicone write only API keys are only required if passing auth in URL path read more here. Alternatively, pass auth in as header.
HELICONE_WRITE_API_KEY=<your API key>
HYPERBOLIC_API_KEY=<your API key>
4

Modify the base path and add a Helicone Auth

import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: process.env.HYPERBOLIC_API_KEY,
  basePath:
    "https://hyperbolic.helicone.ai/v1/${process.env.HELICONE_WRITE_API_KEY}",
});

async function main() {
  const response = await client.chat.completions.create({
    messages: [
      {
        role: "system",
        content: "You are an expert travel guide.",
      },
      {
        role: "user",
        content: "Tell me fun things to do in San Francisco.",
      },
    ],
    model: "meta-llama/Meta-Llama-3-70B-Instruct",
  });

  const output = response.choices[0].message.content;
  console.log(output);
}

main();