Client API Usage and Billing
OMNI Client API is designed to support usage-based billing with Stripe-grade trust posture:- Bill only successful operations (
2xx/3xx) - Do not bill failures (
4xx/5xx) - Do not intentionally double-bill cached idempotency replays (for endpoints that support idempotency)
Billable unit
- 1 billable unit per successful API call.
- Successful means HTTP
2xxor3xx.
- REST
/v1/*routes - Legacy MCP compatibility routes (
/v1/mcp/*) - Hosted MCP JSON-RPC methods (
tools/list,tools/call) overPOST /mcp
Idempotency and billing
Idempotency is required for tool execution:POST /v1/mcp/invoketools/calloverPOST /mcp
- A successful first attempt is billable.
- If an idempotent retry returns a cached replay response, it is not billed again.
- For read-only calls (
GETand hostedtools/list), each successful HTTP response is billable. Retries can be billed more than once if multiple attempts succeed.
Internal beta billing mode
Internal beta runs in a production-like mode:- live Stripe meter event emission
- parallel shadow ledger for reconciliation
Control plane endpoints (internal beta)
During internal beta, usage and billing insights are exposed via the OMNI control plane. These endpoints require an OMNI user session token (not an OMNI Client API key):Billing summary
- current per-call price
- billable units this month (shadow ledger)
- estimated spend
- spend cap and remaining headroom (if configured)
Usage breakdown
Reconciliation dashboard
- shadow-ledger billable units
- Stripe-recorded units (based on successful meter-event emission)
Pause and resume billing traffic
Set spend cap (hard limit)
Operational guidance
Monitor drift early
During internal beta, reconciliation drift can happen due to transient Stripe meter-event failures. Recommended posture:- Check
/reconciliationdaily. - Treat drift as a bug until proven benign.
- If drift persists, pause billing traffic and investigate with request IDs.
Use request IDs everywhere
For every call:- provide
X-Request-Id(optional but recommended) - always log
error.request_id(on failures)
- your logs
- OMNI support investigations
- usage ledger rows