> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Helicone

> Observe TokenLab requests through Helicone Gateway

## Overview

Helicone can proxy and observe TokenLab's OpenAI-compatible requests by routing them through Helicone Gateway and targeting TokenLab.

<Note>
  **Type**: Observability Gateway

  **Primary Path**: OpenAI-compatible chat completions through Helicone Gateway

  **Support Confidence**: Supported observability path
</Note>

## Environment

```bash theme={null}
export HELICONE_API_KEY="your-helicone-key"
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## cURL

```bash theme={null}
curl --request POST \
  --url https://gateway.helicone.ai/v1/chat/completions \
  --header "Authorization: Bearer $TOKENLAB_API_KEY" \
  --header "Helicone-Auth: Bearer $HELICONE_API_KEY" \
  --header "Helicone-Target-Url: https://api.tokenlab.sh" \
  --header "Helicone-Target-Provider: TokenLab" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "gpt-5.4-mini",
    "messages": [
      {
        "role": "user",
        "content": "Say hello from TokenLab through Helicone."
      }
    ]
  }'
```

## OpenAI SDK

```typescript theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.TOKENLAB_API_KEY,
  baseURL: "https://gateway.helicone.ai/v1",
  defaultHeaders: {
    "Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`,
    "Helicone-Target-Url": "https://api.tokenlab.sh",
    "Helicone-Target-Provider": "TokenLab",
  },
});

const response = await client.chat.completions.create({
  model: "claude-sonnet-5",
  messages: [{ role: "user", content: "Write one concise product summary." }],
});
```

## Scope

This setup is for OpenAI-compatible `/v1` traffic. TokenLab also exposes native Responses, Anthropic Messages, and Gemini-compatible endpoints; use direct TokenLab routes for those native formats unless your observability proxy explicitly supports them.
