You've got an AI feature shipping today. The model call works. What it doesn't have yet is any idea who's calling it, or whether they're allowed to. You open a tab to fix that before lunch. Here's the whole path:
sign up → create application → copy API key → install SDK → usage.chat(identity, ...) → see the trace
Five steps. No policy to design, no plan to pick. Just a call that knows whose it is.
1. Get your API key
Sign up, then go to Management → Applications and open your app (or create one). Under Settings is your key:
Two keys, two jobs: your UsageFlow key identifies your application to Vibe. Your Anthropic or OpenAI key authenticates you with the model provider. You need both, side by side:
export USAGEFLOW_API_KEY='uf_live_...'
export ANTHROPIC_API_KEY='your-anthropic-key'
init({ anthropicApiKey }) instead.)
2. Install the SDK
Vibe ships as a client in three languages, built the same way underneath. Pick the one your service already speaks.
npm install @usageflow/vibe
import { usage } from '@usageflow/vibe';
usage.init({ apiKey: process.env.USAGEFLOW_API_KEY! });
const result = await usage.chat({
identity: 'cust_acme', // whose call this is — see below
provider: 'anthropic',
model: 'claude-sonnet-5',
messages: [{ role: 'user', content: 'Summarize this ticket.' }],
});
console.log(result.content);
pip install usageflow-vibe
from usageflow.vibe import VibeClient, Message
client = VibeClient() # reads USAGEFLOW_API_KEY
result = client.chat(
identity="cust_acme", # whose call this is — see below
model="claude-sonnet-5",
messages=[Message("user", "Summarize this ticket.")],
)
print(result.content)
go get github.com/usageflow/usageflow-go-middleware/v2/pkg/vibe
client, _ := vibe.New(vibe.Options{})
result, err := client.Chat(ctx, vibe.ChatRequest{
Identity: "cust_acme", // whose call this is — see below
Provider: vibe.ProviderAnthropic,
Model: "claude-sonnet-5",
Messages: []vibe.Message{{Role: "user", Content: "Summarize this ticket."}},
})
fmt.Println(result.Content)
3. Why that one line matters: identity
identity tells Vibe who this call belongs to — the customer or tenant whose usage, credits, limits, and policies should apply.
Pass a stable ID you already have: a user ID, account ID, or API key you issue. Vibe attaches that identity to the call before the model is contacted.
That one field gives you three things:
- Metering. Tokens are tracked against the identity, rather than a global usage total.
- Enforcement. If the identity is out of allowance, the call can be rejected before the provider is contacted.
- Policy. A
workflowcan later determine which model this identity uses, how much it can consume, or what the call is allowed to do.
Without identity, it's just a model call. With it, Vibe knows whose call it is.
4. See it happen
Run it, and open Console → Traces. Your call is already a row there: the customer, what was requested, what actually ran, and why.
This example row is further along than your first call will be — it's one a workflow policy already caught and routed to a different model. Your first call won't have a policy behind it yet, so its row will just say Allowed. Same table, same columns, one step ahead of where you are right now.
That's the two minutes. No policy, no plan, no dashboard to configure first — just a call with an owner, and a record of what it did.
FAQ
Do I need a policy before my first call?
No. Call chat() with an explicit provider and model, see the trace, and add a workflow and a policy once you know what you want to limit.
What should I use as identity?
Whatever already uniquely identifies the caller in your system: a user ID, an account ID, an API key. It just has to be stable across that caller's calls.
Do I still need my Anthropic or OpenAI key?
Yes. Vibe calls the provider using your existing key. USAGEFLOW_API_KEY is separate, and it's what lets Vibe meter and enforce the call.