Send usage
Helicone
Already logging through Helicone? Lancelot can pull your calls from it every 15 minutes.
Connect
- In Helicone, open Settings → API keys and create a key with read access. It starts with
sk-. - In Lancelot, open Settings → Integrations → Helicone, paste the key and click Connect.
Write-only keys (pk-) are refused, because they can't read your logs. Lancelot finds your Helicone region (US or EU) on its own.
What gets imported
- The first pass goes back up to 30 days.
- After that, new calls every 15 minutes.
- The cost Helicone reported for each call.
Customer and feature
Send each customer's ID in the Helicone-User-Id header. Lancelot also reads a Helicone-Property-Customer-Id or Helicone-Property-Lancelot-Customer-Id property.
For cost by feature, add a Helicone-Property-Feature header.
const openai = new OpenAI({
baseURL: "https://oai.helicone.ai/v1",
defaultHeaders: { "Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}` },
});
await openai.chat.completions.create(
{ model: "gpt-5-mini", messages },
{ headers: { "Helicone-User-Id": user.id, "Helicone-Property-Feature": "chat" } },
);To let Lancelot throttle, pause or switch models inside your app, add the SDK too.