NEAR AI Cloud: Get costs by request IDs
/api-reference/openapi.json post /v1/billing/costs
Returns the cost in nano-USD for each request ID provided. A request ID is
the UUID from the inference-id response header of /v1/chat/completions
and /v1/messages responses (equivalently: UUIDv5 of the response body id
under the DNS namespace). The x-request-id response header is a transport
correlation ID and cannot be used here.
Request IDs that are not found are returned with costNanoUsd: 0
(HuggingFace-compatible); the response then carries a warning field
pointing at the correct ID source. Usage for a just-finished request can
take a few seconds to become visible.