Skip to main content
Docs

One endpoint,
every model.

Tare is an OpenAI-compatible gateway in front of every model you use — ours and the ones you bring yourself. One base URL, one key, and every token accounted for.

BillingReconciliation API

Reconciliation API

What this solves: Lets a finance system, ERP, or dashboard pull accounts from Tare automatically, without a human logging into the console.

The Reconciliation API is an accounting interface for machines. It authenticates with a Reconciliation key, not an Inference key, and doesn't need to simulate a console login.

When to use the Reconciliation API

  • Sync balance and transactions daily.
  • Pull locked statements at month-end.
  • Break usage down by key, model, and date.
  • Compare Tare's accounts with your upstream providers' bills.

Integration advice

  1. Create a Reconciliation key.
  2. Set an expiry on it.
  3. Start with /whoami to confirm the account, period, and time zone.
  4. Sync /balance and /transactions.
  5. Sync /statements at month-end.
  6. When you need business breakdowns, pull /usage/daily and /attribution.
  7. When you need to check upstream bills, pull /reconciliation.

A Reconciliation key can only read accounts; it can't call models, and it can't manage keys. The reverse is also true: don't put a spend-capable Inference key into a finance system.

Reconciliation API: whoami, then the month-end bill A finance system starts with GET /whoami, syncs /balance and /transactions daily, pulls /statements at month-end, then /usage/daily and /attribution for a business split, and /reconciliation to check the upstream bill. Reconciliation API: whoami, then the month-end bill Your job / finance system Tare /v1/integration GET /whoami — account, period, timezone GET /balance · /transactions — daily sync GET /statements — locked bills at month-end GET /usage/daily · /attribution — by business GET /reconciliation — check the upstream bill Create a Reconciliation key with an expiry. It only reads billing. It cannot call models or manage keys. Do not put a spending Inference key in finance. One query covers 100 days, so a year is four pulls. Limit 1200/min, apart from model traffic. /balance and /transactions are account-level, one shared wallet.
Reconciliation API integration order: start from whoami, pull statements at month-end

Details

Use a reconciliation key, not an inference key

Reconciliation endpoints need a reconciliation key (integration key). Create one on the console's API Keys page, choosing Reconciliation as the type; it can also be issued by the platform on your behalf.

The three key types have non-overlapping permissions. Using the wrong type returns a clear rejection, not a vague 401:

Key typePermission
Inference keyCall models
Reconciliation keyRead reports, cannot call models
Provisioning keyManage keys, can neither call models nor read accounts

Endpoints

Base: https://tare.jamerly.ai/v1/integration

PathPurpose
/whoamiWhose key this is, the current period, accessible resources
/balanceBalance, credit limit, available credit, cumulative top-ups and spend
/transactionsTransactions, paginated
/statementsMonthly statement list
/statements/{period}The statement for one period, e.g. 2026-07
/usage/dailyDaily usage, filterable by apiKeyId
/attributionCost, request count, retry / tool-failure waste, broken down by model and by stage. Currently no filtering by usage_label, task_id, or action_code; only the three parameters from / to / apiKeyId
/reconciliationDifferences between platform accounts and upstream bills
Code / Terminal
curl https://tare.jamerly.ai/v1/integration/balance \
  -H "Authorization: Bearer $TARE_INTEGRATION_KEY"

This response wraps only one layer (response.data.balance). If you put another Java gateway in front and forward this path through it (instead of hitting tare.jamerly.ai directly as above), the gateway adds its own envelope, making it two layers of nesting (response.data.data.balance). For how to tell which one you got, see Error codes.

Granularity: balance is account-level, usage can be split by key

/balance and /transactions are account-level; all keys under the same account share one wallet.

This is consistent with the role a key plays: a key is a billing unit, usage can be split by key, and the balance is shared. To limit a single key's spend, use the limit of the Provisioning key, which is a separate mechanism.

Splitting usage by key: /usage/daily?apiKeyId=….

Two limits

  • A single query window is capped at 100 days. A year's reconciliation takes four pulls. Exceeding it returns a clear error rather than silently truncating — a scheduled job starting from from=2020-01-01 will fail clearly here, instead of getting data quietly cut short.
  • Rate limit 1200/minute, counted separately from model traffic. Reconciliation often pages through hundreds of pages by day, by key, by model; the model-tier threshold will 429 on first integration.

Field stability

The response fields of these endpoints are a stability promise and won't be renamed by later implementation changes. If you need OpenAPI / JSON Schema descriptions, see the last section of Endpoint list.

Two prerequisites for reconciliation

The period is split by some time zone. 2026-07 is just a string; its starting instant isn't self-evident, so every response carries the time zone used for the split. If your side splits months by a different time zone, the usage on the last day of the month falls into a different month, the two sides never reconcile, and the difference is small enough to be mistaken for rounding error.

Late corrections count toward the next period. A locked statement isn't rewritten. If your ERP expects "when a correction arrives, last month's numbers change with it", that won't happen. Look for the top-up line in the current period; it notes which month it came from.

Next steps

Docs last updated Nov 27, 2026, 12:56 (UTC+8)