Skip to main content
ECN bills metered work in credits, pegged at $0.10 / credit (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

Cost typeHow it’s pricedWhat’s recorded
LLM / embeddings (via OpenRouter)real provider cost × markupUsageEvent (with cost_usd) + CreditTransaction spend, written by ai/gateway.py
Paid external APIs (e.g. Apify actor runs)real run cost × the same markupUsageEvent (provider="apify", feature="lead_signal_fetch"), plus a CreditTransaction when a managed wallet is charged, via metering.meter_external_cost
Free public data (e.g. Socrata permits)not billedDataQueryLog only
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.