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
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
Enable Helicone observability
Create or update your ai-gateway-config.yaml
:
helicone:
# also enables authentication
features: observability
routers:
my-router:
load-balance:
chat:
strategy: latency
providers:
- openai
- anthropic
Start the gateway
npx @helicone/ai-gateway@latest --config ai-gateway-config.yaml
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"}]}'
Responses are generated using AI and may contain mistakes.