AI Chat

What this conversation has cost so far.

Changed on

Read from the AI gateway's usage log for the conversation's owner only. Figures are estimates: requests to a model with no known price are counted in unpriced_requests instead of being silently priced at zero.

get/ai/conversations/{public_id}/usage

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/ai/conversations/{public_id}/usage
  • Auth: HTTP bearer

Path parameters

public_idstring required

Response

byok_requestsinteger required

Requests made with the user's own provider key rather than the platform's, which Temps does not bill.

cost_microcentsinteger required

Estimated cost in microcents (1/10000 of a cent), summed over the requests that have a known price.

input_tokensinteger required
output_tokensinteger required
requestsinteger required
summarized_messagesinteger required

Earlier messages folded into the chat's running summary, so the model no longer sees them word for word. 0 when the chat was never compacted or the count could not be read.

unpriced_requestsinteger required

Requests that used tokens but were logged at zero cost because the model has no known price. When this is not zero, the cost is a floor.

Changes