GVGanivra

Integration guide

From model call to customer margin.

Ganivra stays outside your model request path. Initialize once, attach the current tenant’s ID, and let Ganivra calculate provider cost, customer economics, trends, and margin.

01Initialize the SDK or POST events
02Pass your existing tenant/account ID
03See cost and margin without proxying traffic
Typical pathOne workflowStart narrow and expand after validation
Customer setupAutomaticNo Ganivra customer registration required
Prompt contentNever requiredSend IDs and versions, not content
Revenue per callOptionalUse plans or billing imports instead

SDK & REST API

Integration instructions.

Return here whenever you need to connect another service, review the event contract, or update your instrumentation.

Captured automatically

Technical cost signals

Model and provider · input, output, and cached tokens · latency · status and errors · execution IDs

You provide as metadata

Business context

Your product or site · current tenant/customer ID · workflow · feature · prompt version · optional revenue

Dynamic B2B attribution

No customer registration required.

Read the signed-in tenant or account ID from your own request context and send it as customer_id. Every new value appears automatically in customer economics and cohorts.

Your Ganivra workspace
Your company
application
Product, site, or domain
customer_id
Current B2B tenant/account
Plan assignment
Only needed to calculate revenue automatically
01 · Install and initializepython -m pip install ganivraimport ganivra
ganivra.init(api_key="your_key")

This alone captures cost telemetry. No prompt or response content is collected.

02 · Attribute the current customer dynamicallydef run_ai(account, request):
  with ganivra.trace(
    application="voice-platform",
    customer_id=account.id,
    workflow="outbound_call",
    feature="sales_agent",
    metadata={"plan": account.plan},
  ):
    client.responses.create(...)

Use a stable pseudonymous tenant ID—not a person’s name. Do this inside each authenticated request; Ganivra discovers customers automatically. Metadata accepts additional bounded JSON dimensions. Configure or assign a pricing plan separately when you want subscription, credit, token, or usage revenue.

What your team owns

A small, explicit contract.

Ganivra needs operational facts from the call and stable business identifiers from your application. Everything else can be added incrementally.

Required for cost

Execution telemetry

Provider, model, operation, token or unit usage, latency, status, and stable event/execution/step IDs.

Recommended for the aha

Business attribution

application, dynamic customer_id, workflow, feature, and prompt version connect spend to the product and customer that caused it.

Optional for profit

Revenue configuration

Assign subscription, token, credit, execution, or hybrid plans—or import billing actuals. Per-call revenue is not required.