Skip to content

Native billing imports

Last updated: 2026-10-28T13:54:53-03:00 (UTC-3)

Compare what the gateway estimated with what the provider charged. You export the cost report from OpenAI, Anthropic or Google Cloud Billing, paste it into the console, and the gateway normalizes it and adds it to the financial report. It is part of the quota_finance flag.

A published price and a cost report are different things: the first is a reference rate; the second is what was accounted to your account over a period.

Source What to paste Caveats
OpenAI Costs The pages (object: page) with the buckets and the pagination amount.value in USD; a missing amount does not become zero. Requires an OpenAI administrative credential
Anthropic Cost Report The pages with the starting_at/ending_at buckets amount comes in cents, including fractional cents; the gateway divides by 100 exactly
Google Cloud Billing The selected rows from the BigQuery detailed export USD and the declared account only. Credits, taxes and adjustments stay separate. Filter first: the export includes every GCP service, not just Gemini

The gateway does not go to the network to import and does not use inference keys to call billing APIs: you provide the export.

  1. In the console, as a global admin: Budget & TPM → Finance & reconciliation → Provider cost exports.
  2. Start a draft and paste the statement with the export’s pages.
  3. The result updates the report.

Through the API, POST /api/v1/admin/quota-finance/import-native:

{
"version": 0,
"statement": {
"id": "openai_costs_october",
"source": "openai_costs",
"account_id": "operator_selected_account",
"provider_id": "configured_provider_id",
"connection": "COPY_THE_64_HEX_CONNECTION_FINGERPRINT",
"period_start": "2026-10-01T00:00:00Z",
"period_end": "2026-10-02T00:00:00Z",
"coverage": "partial",
"pages": []
}
}

This is a template: replace the version, account, connection, period and pages with the real data. The connection hash comes from GET /api/v1/admin/quota-policies. In the console, API reference generates the complete curl with login, CSRF and the current version. Never put keys or tokens in the export.

  • Up to 32 pages, 1,000 rows and 512 KiB.
  • Buckets within the declared UTC period, of up to 366 days.
  • Complete pages, in order, with no repeated cursor; the last one with has_more: false.
  • Rejected: partial pages, unknown currency, missing amount, duplicates and repeated JSON fields.
  • Values with up to 12 decimal places, in exact arithmetic, with no float and no silent rounding.
  • Use an exact decimal export from BigQuery, without rounding in the browser. The invoice month and the usage period can differ because of late entries.
  • Repeating the same import does not add it again.
  • A revised export with an overlapping period is rejected. There is no flow yet to replace a revised invoice; record only the difference as an adjustment.
  • Keep the original export outside the gateway according to your company’s policy; the gateway stores the normalized version and the hashes.
  • Aggregated rows. None of these reports carries the ID of the gateway’s inferences, so the rows stay aggregated: they do not get made-up IDs and do not release stuck reservations. For that, see reconciliation by metering or charge.
  • Unverified coverage. The origin is marked as operator_attested_export. complete_export describes your selection, not a certification of the invoice.
  • An aggregated report does not prove that no work happened.
  • Global viewers and operators read the reports, without importing or reconciling. Team roles do not see financial data.

m7gtw[email protected]