Proxy Integration

Recomendation: Model Override

When using Azure, the model displays differently than expected at times. We have implemented logic to parse out the model, but to guarantee your model is consistent, we highly recommend using model override:

Helicone-Model-Override: [MODEL_NAME]

Click here to learn more about model override
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

HELICONE_API_KEY=<your API key>
3

Modify the base path and add a Helicone-Auth header

Please ensure to include the ‘api-version’ in all of your requests.
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://oai.helicone.ai/openai/deployments/[DEPLOYMENT_NAME]",
  defaultHeaders: {
    "Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`,
    "Helicone-OpenAI-API-Base": "https://[AZURE_DOMAIN].openai.azure.com",
    "api-key": "[AZURE_API_KEY]",
  },
  defaultQuery: { "api-version": "[API_VERSION]" },
});