# Helicone

> One line of code to log, trace, and route every LLM call

- Category: Evaluation & Production Ops / Observability & LLMOps
- Language: TypeScript
- Repository: https://github.com/Helicone/helicone
- Website: https://www.helicone.ai
- Canonical page: https://ai-tldr.dev/tools/helicone/

## In short

Helicone is an open-source AI gateway and LLM observability platform for AI engineers. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in TypeScript. To get started: get your API key.

## Overview

Helicone is an open-source AI gateway and LLM observability platform for AI engineers. You route your model requests through its endpoint by changing one line of code, and Helicone logs every call so you can inspect traces, track cost and latency, and debug agents, chatbots, and document pipelines.

It works as a drop-in change to the OpenAI client: you point the baseURL at Helicone's AI gateway and add your Helicone API key. The same gateway gives you access to 100+ models from providers like OpenAI, Anthropic, and Gemini through one API key, with intelligent routing and automatic fallbacks.

As an LLM observability tool, Helicone fits teams who need to see what their model calls are actually doing in production. You can use the hosted service with a free monthly tier, or self-host the whole stack with Docker or a Helm chart for full control over your logs.

## What it does

- AI Gateway: reach 100+ models through one OpenAI-compatible API key with intelligent routing and automatic fallbacks
- One-line integration to log requests from OpenAI, Anthropic, LangChain, Gemini, and the Vercel AI SDK
- Trace and debug sessions for agents, chatbots, and document-processing pipelines
- Track cost, latency, and quality metrics, with one-line export to PostHog for custom dashboards
- Prompt management: version prompts from production data and deploy them through the gateway without code changes
- Self-hostable via Docker Compose or a production Helm chart; SOC 2 and GDPR compliant

## Getting started

Sign up for a Helicone API key, then point your OpenAI client at the Helicone gateway. You can also self-host the full stack with Docker.

1. Get your API key

   Sign up at helicone.ai/signup to get a Helicone API key. The free tier covers 10k requests/month with no credit card.

2. Route requests through the gateway

   Update the baseURL in your OpenAI client and pass your Helicone API key. Every call is now logged, and you can swap the model to any provider Helicone supports.

```ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://ai-gateway.helicone.ai",
  apiKey: process.env.HELICONE_API_KEY,
});

const response = await client.chat.completions.create({
  model: "gpt-4o-mini",  // claude-sonnet-4, gemini-2.0-flash or any model from https://www.helicone.ai/models
  messages: [{ role: "user", content: "Hello!" }]
});
```

3. Self-host with Docker (optional)

   To run Helicone yourself, clone the repo and start the services with the included docker-compose script.

```bash
# Clone the repository
git clone https://github.com/Helicone/helicone.git
cd docker
cp .env.example .env

# Start the services
./helicone-compose.sh helicone up
```

## When to use it

- Debug a misbehaving agent or chatbot by inspecting its full request traces and sessions
- Track LLM cost and latency across providers and export the metrics to PostHog dashboards
- Use one API key and the gateway's automatic fallbacks to reach 100+ models without per-provider wiring
- Self-host LLM logging on your own infrastructure when data must stay in-house for compliance
