policy applied · model rerouted identity: cust_acme

RUNTIME USAGE CONTROL

Measure every interaction.
Control every resource.

Identify the customer behind every request, measure what they consume, and enforce your business policies while the request is still running.

Read the docs
TypeScript @usageflow/vibe Python usageflow-vibe Go Go · Vibe OpenAI OpenAI • Anthropic Anthropic

Metering tells you what happened. UsageFlow decides what happens next.

Free: 1 workflow with a live policy • No credit card

Scroll

Runtime control

Decide what runs, while it runs.

Your code says what it wants. UsageFlow checks who is asking and shapes what actually executes.

Illustrative example · customer-support · identity cust_acme · Console-edited policy, no redeploy

Requested

  • Modelopus-4
  • ReasoningHigh
  • ToolsOn
  • Tokens8k
UsageFlow Awaiting

Executed

  • —
01 intent Recording intent usage.chat() · opus · reasoning=high · tools · 8k
02 policy Checking policy budget-guard · identity cust_acme at $98 / $100 cap
03 transform Rewriting plan sonnet · reasoning=low · tools off · 4k tokens
04 why Explaining change budget exceeded · budget-guard · no redeploy

Developer sends intent — Console policy has not run yet.

Why UsageFlow

Your customers’ usage is connected. Your infrastructure isn’t.

Today

Authknows the customer
Logsknow the usage
Codeknows the rules

Nothing connects them.

With UsageFlow

  1. 01
    Identifyidentity: 'cust_acme'
  2. 02
    Measure1,284 requests · $42.18
  3. 03
    Controlallow · transform · block

one identity · one ledger · one policy layer

Metering tells you what happened.
UsageFlow decides what happens next.

Policy engine

Policies decide what happens next.

Rules on who the customer is, their plan, and what they’ve used. Checked on every request.

Trigger

WhenChat request comes inworkflow = customer-support

Tiers first match wins

1
usage reaches$100Cost ($)

Then

Block the request
2
usage reaches$95Cost ($)matched · cust_acme

Then

Route to a different modelclaude-sonnet-5

Effects

Notify SlackReport to a Stripe meter
Example policy
  • ConditionsIdentity, plan, and metadata you send.
  • ThresholdsTokens or spend, per customer.
  • TiersDifferent outcomes at different levels.
  • ActionsRoute, degrade, or block (Vibe SDK).
  • EffectsSlack, webhook, Stripe meter.

Not just models.

The same customer identity and ledger cover more than LLM calls.

Identity · usage · cost

Every interaction belongs to a customer.

Usage, cost, and policy decisions, tied to the customer behind them.

EXAMPLE LEDGER sample data

CUSTOMER

cust_acme

Acme Inc.

USAGE

1,284

requests

SPEND

$42.18

this month

BILLING

Stripe

Synced

16.6% below requested cost this month · sample data

Integration

Integrate through code. Control through policy.

Pass identity and workflow with each call. Policy lives in the Console.

FAQ

Straight answers for developers.

UsageFlow is a runtime usage control layer. Your app passes a customer identity and workflow with each call; UsageFlow measures consumption, attributes it to that customer, and applies Console policies while the request runs. With the Vibe SDK for AI calls, policies can enforce budgets and route models. The Vibe SDK is the current integration for AI calls: usage.chat() and usage.prompt().
Gateways sit on the provider HTTP path and mostly route and log by API key. UsageFlow runs inside your app, merges Console policy with your intent, transforms execution when needed, meters what actually ran, and can sync executed usage to Stripe, on identity and workflow dimensions. Metering tools tell you what happened; UsageFlow also decides what happens next.
On each call, UsageFlow identifies the customer, reads their current usage, and evaluates the matching Console policy (thresholds, tiers, plan or metadata scope) before the provider runs. The outcome is to allow, route to another model, or block, and the trace records the reason.
No. Policy edits in UsageFlow Console apply on the next call. Traces show requested vs executed settings and the reason for any transform.
Pass your customer or tenant id as identity. UsageFlow scopes a ledger to that identity and can report (Console / Stripe) on identity and workflow dimensions, so spend reads in language your customers understand, not just API keys.
The Vibe SDK for TypeScript, Python and Go. It targets OpenAI and Anthropic through a unified API. For full provider-specific surfaces, use usage.wrap(nativeClient) alongside the unified path.
Free includes one workflow with live policy (basic model ladder; policies edited in the Console apply without redeploy). Paid tiers add more workflows, tool gates, generation caps, and Stripe sync.

Measure every interaction.
Control every resource.

Start with one workflow. Know what every customer consumes, and decide what happens next.

Read the docs

Free: 1 workflow with a live policy • No credit card • TypeScript, Python & Go • OpenAI + Anthropic