v65

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0794109383.7 KB
usage

Set Usage Price Rows

Set the cost of imported usage rows from manual per-1M rates (standalone).

Target either the current selection (ids) or everything matching a filter (by_filter: true). Cost / billing meters / pricing breakdown are recomputed from each row's own token counts at the supplied input / output / cache_read / cache_write per-1M rates (manual rates, not a recompute from configured pricing). Only imported rows (counts_toward_budget = false) are touched, so users.spend is never affected. Master-key only.

post/v1/usage/set-price

Request body

by_filterboolean
cache_read_price_per_millionnumber nullable
cache_write_price_per_millionnumber nullable
end_datestring date-time nullable
endpointstring nullable
idsstring[] nullable
input_price_per_millionnumber required
output_price_per_millionnumber required
pricedboolean nullable
providerstring nullable
sourcestring nullable
source_labelstring nullable
start_datestring date-time nullable
statusstring nullable
toolstring nullable

Response

Successful Response

matchedinteger
unchangedinteger
updatedinteger