sk-abto-live-P4c…Create keyShown once at creation.
Send LLM traffic through the ABTO gateway so cost, latency, and results are captured at the source. Use your sk-abto-… key (server-side).
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ABTO_API_KEY, // your ABTO secret key
baseURL: "https://api.abto.app/v1", // ABTO gateway
});
const completion = await client.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Hello!" }],
});
// completion.id ↔ X-Abto-Request-Id → link conversions to this callPoint your existing OpenAI client at our base URL. Anthropic models route through the same endpoint — just change the model name (e.g. claude-sonnet-4-5).
Capture conversions (signup, purchase, thumbs-up…) in the browser or backend and link them to AI calls via requestId. It uses your pk-abto-… key — safe to ship in client bundles. Create a public key →
import { analytics } from "@abto/analytics-js";
analytics.init("YOUR_PUBLIC_KEY", {
apiHost: "https://api.abto.app/v1",
});
// Page views are auto-captured. Identify and track conversions:
analytics.identify("user_123");
analytics.track("checkout_completed", {
requestId, // from the AI call above — links the outcome
properties: { amount: 49000, currency: "KRW" },
});Zero-dependency, ~7 KB. Auto-captures $pageview on route changes, and uses sendBeacon to flush on tab close.
Mints a public key, loads @abto/analytics-js right here, and fires a $pageview + demo_click at the gateway over CORS. Then open Events to see them land.