Submit cost and/or usage data

Ingests a batch of cost records. Each record is either a pre-computed cost (caller supplies amount + currency) or a usage record (caller supplies vendor/model/token counts and Paid prices it server-side). The batch is all-or-nothing: if any record fails validation, the entire request is rejected with a 400 and nothing is persisted.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Request

Body
costslist of objectsRequired

Response

200
ingestedinteger>=0
Number of records persisted.
duplicatesinteger>=0

Number of records skipped because their idempotencyKey matched a previously ingested record.

Errors

400
Bad Request Error
403
Forbidden Error
500
Internal Server Error