Key TypeAccessPath AuthHeader AuthREST API
SecretRead + WriteNot RecommendedYesYes

Usage Examples

import OpenAI from "openai";

// Use secret or public key
const openai = new OpenAI({
  apiKey: request.env.OPENAI_API_KEY,
  baseURL: "",
  defaultHeaders: {
    "Helicone-Auth": `Bearer ${HELICONE_SECRET_API_KEY}`,

Ensure that secret keys are always kept secure and never exposed in client-side code.


Questions or feedback? Reach out to or schedule a call with us.