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}`, }, });
HELICONE_API_KEY
is set as an environment variable:export HELICONE_API_KEY=<your API key>
Helicone-Auth
header in your requests:defaultHeaders: { "Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`, }
baseURL: "https://oai.helicone.ai/v1",
Helicone-Model-Override
header:"Helicone-Model-Override": "[MODEL_NAME]"
api-version
Parameter:api-version
parameter is included in your requests:defaultQuery: { "api-version": "[API_VERSION]" }