DocumentationRefario / 2026

From first event to customer margin.

Send the customer context your application already knows. Refario connects it with provider cost and revenue so every account has a readable profitability record.

TypeScriptingest.ts
import { refario } from "@refariohq/sdk"

const client = refario.init({ endpoint, apiKey })
const run = client.startRun({
  workflow: "resolve-order",
  customerId: "cus_123",
  featureId: "support_agent"
})
run.llmCall({ name, provider, model })
await run.end({ success: true })
Usage attributed · cus_123
01 / Quickstart

Three steps to the first useful margin answer.

Start with one real workflow and customer. Validate attribution, add revenue, then expand across the product.

01

Create a project

Choose an environment and copy the project key from the Refario app.

02

Attribute usage

Attach customer, workspace, and feature identifiers to the runs you emit.

03

Add revenue

Enter monthly recurring revenue and plan details, then review the customer’s calculated margin status.

02 / Attribution model

Only the context that makes cost useful.

Refario keeps technical usage detail while adding the commercial dimensions required to understand customer profitability.

01Customer
02Workspace
03Feature
04Model call
05AI cost
06Revenue
Start with one project

Know which customers are profitable.

No credit card. Attribute real AI usage and find the accounts putting your margin at risk.