ECN_CREDIT_USD_VALUE). Pricing is cost-plus: credits track the real cost of
each action, so a call can never be billed below what it actually cost to run.
What gets metered
Because paid external spend flows through the same cost-plus path and ledger as
LLM spend,
python manage.py check_margins can audit realized gross margin per
feature across both. There is no un-metered paid-API expense.
How a call is metered
1
Preflight
The gateway estimates the credit cost from the rate card and checks it against
your org’s budgets. Over budget → rejected before any provider call.
2
Execute
The provider call runs through managed ECN keys.
3
Meter
A
UsageEvent records the real cost_usd, tokens, model, and feature; a
CreditTransaction debits your wallet. Both are immutable — an audit trail.Rate card
The rate card sets a preflight floor per feature; the actual charge is the real cost-plus amount. Features include (non-exhaustive):profile_draft, context_author, context_refresh, context_pack_compile,
lead_enrichment, lead_qualify, outreach_draft, lead_signal_fetch (paid
data, priced from real cost), x_reply_draft, funnel_generate.
The authoritative, current list is whatever GET /api/v1/credits/rate-cards/
returns for your environment — treat this as illustrative, not exhaustive.
Query the live rate card at GET /api/v1/credits/rate-cards/ and your balance at
GET /api/v1/credits/wallet/ (or the get_wallet_balance MCP tool).
Managed credits, not BYOK
The hosted product uses ECN-managed provider keys (OPENROUTER_API_KEY,
APIFY_API_TOKEN, …) and meters usage to your org’s wallet. There is no
customer-facing bring-your-own-key in the hosted product.
Self-hosting your own keys (so you pay providers directly, $0 to ECN) is a
self-host / Community edition capability, gated by
ECN_DEPLOYMENT_MODE — see
BYOK & self-host. It is not a hosted billing feature.