Credit Consumption
The Credits page covers the basics. This guide details the dedup model, how to estimate a job's cost, and how to track usage over time.
The dedup model#
Exports charge 1 credit per company that your workspace has not exported before. The first time you export Acme Inc. you're charged; every later export that includes Acme is free. This makes overlapping or repeated exports cheap — you only ever pay once per company, per workspace.
The create response makes the math explicit:
{
"export_job": { "id": "...", "status": "pending" },
"requested_count": 500, // companies the source resolved to
"already_unlocked": 320, // previously exported — free
"new_count": 180, // newly unlocked
"credits_charged": 180, // == new_count (capped at your balance)
"would_skip": 0, // rows dropped if balance < new_count
"capped_at_10k": false,
"transaction_id": "..."
}capped_at_10k). For larger sets, split the work into multiple exports.Estimating cost#
The exact charge is only known at create time (the server computes the dedup against your workspace's history). To estimate an upper bound beforehand, run the same search and read total — your charge will be at most min(total, 10000), and less to the extent you've already exported some of those companies. Check your balance first so you can top up before a large run:
// Upper-bound estimate before creating an export.
const [search, credits] = await Promise.all([
api("POST", "/api/v1/companies/search", filters),
api("GET", "/api/v1/credits"),
]);
const upperBound = Math.min(search.total, 10000);
if (credits.balance < upperBound) {
console.warn(`May be short: balance ${credits.balance} < up to ${upperBound}`);
// top up at app.cornect.io/account/credits, or proceed —
// already-exported companies won't be charged again.
}Tracking usage#
GET /credits returns recent_transactions with a signed amount and a reason (e.g. export_charge). Negative amounts are charges, positive are grants/refunds. Poll it after exports to reconcile spend, and store the transaction_id from each create response to tie a charge to a specific export job.