← Units360.ai
Units360 · AI Medical Scribe
ACT 1 OF 5
Define Units — Revenue + Cost
Two units, one platform
Dr. Smith Patient REC 00:00 SCR-2024-06-21-001 0:00 min Clinic Minds IDLE GPT-4
Live Metering Flow
🎙️ Audio Session IDLE 📲 ClinicMinds App READY Units360 API READY 📒 Revenue Ledger $0.00 💰 Cost Ledger $0.00
Revenue
$0.00
10 mins × $0.50
LLM Cost
$0.00
4,200 tok × $0.0005
Margin
$0.00
Revenue − Cost
Sessions
0
this period
🧾 Invoice · SCR-2024-06-21
✓ SENT
ProviderClinicMinds Inc.
CustomerGeneral Hospital
Session IDSCR-2024-06-21-001
Audio: 10 min × $0.50$5.00
LLM: 4,200 tok × $0.0005$2.10
Revenue
$5.00
Cost
$2.10
Margin
$2.90
Define Session LLM Process Dashboard Invoice
ClinicMinds · Units360 Terminal
Usage Event
💚 Revenue Unit — audio_minute
unit_id
display_name
type
account
rate
reset_period
🟡 Cost Unit — llm_token
unit_id
display_name
type
account
rate
reset_period
💚audio_minuteREVENUE·$0.50 / minhospital-001
🟡llm_tokenCOST·$0.0005 / tokllm-openai
💡 ClinicMinds charges $0.50 per audio minute (revenue) and pays $0.0005 per LLM token (cost). Instead of two billing systems, they define both units in Units360 once — dual-ledger tracking with zero custom code.
🐢 Speed: 🐇
Space · ← → · R · ? Guide
Demo Guide · Medical Scribe Edition
Units360? ClinicMinds Revenue Unit Cost Unit Account Transaction MDT RTE CloudEvents
Use Case
🏥ClinicMinds — AI Scribe Startup

ClinicMinds sells AI-generated clinical notes to medical practices. A doctor speaks; the app records the audio; GPT-4 transcribes and structures the note.

Revenue model: charge hospitals $0.50 per recorded minute. Cost model: pay OpenAI $0.0005 per token. A 10-minute session generates ~4,200 tokens, costing $2.10 to produce and billed at $5.00 — a $2.90 margin.

Company
ClinicMinds Inc.
Revenue unit
audio_minute — $0.50/min
Cost unit
llm_token — $0.0005/tok
Session margin
~$2.90 (58%) per session
Demo Overview
⚙️How Units360 works in ClinicMinds

ClinicMinds plugs Units360 into two points of their pipeline — once after a session ends, and once after GPT-4 finishes transcription. Everything else — ledgers, margin calculations, invoices, alerts — happens automatically.

1. Session ends
audio_minute fired
2. GPT-4 runs
llm_token fired
3. Ledgers update
real-time margin
4. Invoice out
zero manual work

Both events carry the same session_id, so Units360 automatically links revenue to cost and computes per-session gross margin. No SQL, no dashboards to build, no ETL pipelines.

Step 1
Doctor records a 10-min session — ClinicMinds fires audio_minute qty=10 to Units360
Step 2
GPT-4 transcribes 4,200 tokens — ClinicMinds fires llm_token qty=4200 to Units360
Step 3
Units360 posts $5.00 revenue and $2.10 cost to the live dashboard — margin visible instantly
Step 4
At billing cycle end, Units360 auto-generates the invoice for General Hospital — no manual reconciliation
2 API calls totalReal-time marginAuto-invoiceNo DevOps
Revenue Unit
📒audio_minute — Revenue Tracking

A revenue unit in Units360 represents a billable service. Each time ClinicMinds completes a session, it fires a Units360 API call with the recorded minutes. The Revenue Ledger increments in real time.

POST /v1/events
{
"unit": "audio_minute",
"qty": 10,
"account": "hospital-001",
"session_id": "SCR-2024-06-21-001"
}
REVENUE typeBillable to hospital
Cost Unit
💰llm_token — Cost Tracking

A cost unit in Units360 represents an operational expense. After GPT-4 processes the audio, ClinicMinds fires a second API call with the token count. The Cost Ledger updates independently.

Both events carry the same session_id, so Units360 links them for per-session margin analysis.

POST /v1/events
{
"unit": "llm_token",
"qty": 4200,
"account": "llm-openai",
"session_id": "SCR-2024-06-21-001"
}
COST typeLinked by session_id
Core Concept
🏦Account

An Account is a billing entity in Units360 — it can represent a customer, a supplier, or an internal cost centre. Accounts hold balances for their associated units.

hospital-001
Revenue account — General Hospital, billed for audio minutes
llm-openai
Cost account — OpenAI, charged per token consumed
Core Concept
Transaction

A Transaction is an immutable ledger entry created when a CloudEvent is processed. Each POST to the Units360 API creates one transaction. Transactions can never be deleted — they form an audit trail.

txn_type
DEBIT or CREDIT
unit
The unit being measured
qty
Amount consumed or produced
session_id
Links related transactions
Platform Component
📋Usage Configuration

The Usage Configuration is a declarative template that describes your entire metering model. You define it once; Units360 auto-provisions the API endpoints, ledger tables, alert rules, and billing logic.

"units": [
{ "id": "audio_minute", "type": "REVENUE",
"rate": 0.50, "account": "hospital-001" },
{ "id": "llm_token", "type": "COST",
"rate": 0.0005, "account": "llm-openai" }
]
DeclarativeVersion-controlledAuto-provisions API
Platform Component
⚙️Live Processing Engine

The Live Processing Engine is the serverless runtime that processes incoming CloudEvents. It validates events against the configured schema, writes transactions to the ledger, evaluates alert rules, and triggers webhooks — all in under 50ms.

No infrastructure to manage. It scales automatically with your event volume. A startup doing 100 sessions/day and an enterprise doing 100,000 use the same deployment model.
<50ms p99Auto-scaleAlert evaluation
Protocol
☁️CloudEvents 1.0

Units360 events conform to the CloudEvents 1.0 specification — a CNCF standard for describing event data. This means any CloudEvents-compatible system (Kafka, EventBridge, Pub/Sub) can produce events to Units360.

"specversion": "1.0",
"type": "io.units360.metering.event",
"source": "clinicminds/session-service",
"id": "evt_scr_001",
"data": { "unit": "audio_minute", "qty": 10 }