Frameworks & Platforms
Helicone
Observe TokenLab requests through Helicone Gateway
Overview
Helicone Gateway can forward OpenAI-compatible requests to TokenLab and record their traces.
Environment
export HELICONE_API_KEY="your-helicone-key"
export TOKENLAB_API_KEY="sk-your-tokenlab-key"cURL
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.6-luna",
"messages": [
{
"role": "user",
"content": "Say hello from TokenLab through Helicone."
}
]
}'OpenAI SDK
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 covers OpenAI-compatible /v1 requests. Send Responses, Anthropic Messages, and Gemini through Helicone only when it supports that format; otherwise call TokenLab directly.