CostRecord
- customerType:requiredProperties: 2
The customer, by
customerIdorexternalCustomerId. When both are given,customerIdis used. - typeType: "cost" or "usage"enumrequired
cost: an amount you were charged, inamountandcurrency.usage: a model call's tokens, invendor,modelandusage, priced from the model price list unless you givecostOverride. - amountType: numbermin:0
costrecords, required: decimal amount in major units (dollars for USD). - costType:
Override Properties: 2usagerecords: what the call cost, instead of pricing its tokens from the price list. - currencyType: string
costrecords, required: USD or your company's own currency (any case). Amounts in your currency are converted to USD at your exchange rate. - idempotencyType: string
Key Your unique ID for this record. A record whose key was used before is skipped. Keys don't expire.
- metadataType:Properties: 1
Your own key-value data, kept with the record and returned as sent.
- modelType: string
The model, as your vendor names it. Required for
usagerecords; dated and prefixed names find their base model's price. - productType:Properties: 2
The product, by
productIdorexternalProductId. When both are given,productIdis used. - timestampType: stringFormat: date-time
When the cost was incurred (ISO 8601). Default when the request arrives.
- traceType: string
Id The trace the cost belongs to. A signal sent with the same
data.trace_idlends it its product and event name. - usageType:Properties: 5
Required for
usagerecords. On acostrecord, token counts are kept for reporting. - vendorType: string
Who served it, e.g.
anthropicoropenai. Required forusagerecords.