This integration method is maintained but no longer actively developed. For the best experience and latest features, use our new AI Gateway with unified API access to 100+ models.
Depending on the model you are using, you may need to adjust the base URL.
For most cases with Groq, the base URL will be https://groq.helicone.ai/openai/v1.However, in some cases, you may need to use https://groq.helicone.ai/v1.
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. Set HELICONE_API_KEY as an environment variable
HELICONE_API_KEY=<your API key>
Modify the base path and add a Helicone-Auth header
const groq = new Groq({
apiKey: process.env.GROQ_API_KEY,
baseUrl: "https://groq.helicone.ai/openai/v1",
defaultHeaders: {
"Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`,
},
});