Authentication Required: Observability requires Helicone authentication to be enabled. Please complete the Authentication setup first before enabling observability.

Enable observability to automatically log all requests to your Helicone dashboard for monitoring usage, costs, and performance across all providers.

Quick Start

1

Set your Helicone API key

Add your Helicone API key as an environment variable:

export HELICONE_CONTROL_PLANE_API_KEY=sk-helicone-your-api-key
2

Enable Helicone observability

Create or update your ai-gateway-config.yaml (authentication must also be enabled):

helicone:
  authentication: true  # Required for observability
  observability: true

routers:
  my-router:
    load-balance:
      chat:
        strategy: latency
        providers:
          - openai
          - anthropic
3

Start the gateway

npx @helicone/ai-gateway@latest --config ai-gateway-config.yaml
4

Make requests

Since authentication is enabled, you must include your Helicone API key:

curl -X POST http://localhost:8080/router/my-router/chat/completions \
  -H "Authorization: Bearer sk-helicone-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

✅ Check your Helicone dashboard to see requests logged automatically!

Privacy Controls

To exclude sensitive data from logs:

curl -X POST http://localhost:8080/router/my-router/chat/completions \
  -H "Authorization: Bearer sk-helicone-your-api-key" \
  -H "x-helicone-omit-request-log: true" \
  -H "x-helicone-omit-response-log: true" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/gpt-4o-mini", "messages": [{"role": "user", "content": "Sensitive data"}]}'