# 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](/docs/features/quota-finance/#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.

## Accepted sources

| Source | What to paste | Caveats |
| --- | --- | --- |
| [OpenAI Costs](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/usage/methods/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](https://platform.claude.com/docs/en/api/beta/organization/cost_report/retrieve) | 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](https://docs.cloud.google.com/billing/docs/how-to/export-data-bigquery-tables/detailed-usage) | 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.

## How to use it

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`:

```json
{
  "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.

## Validation rules

- 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.

## Immutable, with no double counting

- 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.

## Limits

- **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](/docs/features/quota-finance/).
- **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.

## See also

- [Financial reconciliation](/docs/features/quota-finance/).
- [Budgets and TPM](/docs/features/budgets-and-tpm/).
