Saltar a la navegación

List Generation Costs

List the recorded cost of every generation that finished in a time range. Each item is the Get Generation Costs object plus createdAt, finishedAt, model and apiKey.

The range filters on finishedAt (startTime inclusive, endTime exclusive), oldest first, so back-to-back ranges never overlap. Page with cursor until nextCursor is null, keeping the same range.

Costs are usually recorded within 10 minutes of completion. totalCostUsd is null while any part is pending or unavailable. See Export usage and costs.

Autenticación

x-api-keystring
Autenticación con clave API vía encabezado

Parámetros de consulta

startTimedatetimeRequerido

Start of the range, inclusive. UTC ISO 8601 date-time, such as 2026-11-12T00:00:00Z.

endTimedatetimeRequerido

End of the range, exclusive. UTC ISO 8601 date-time. Must be after startTime.

limitintegerOpcional
Items per page, 1 to 500. Defaults to 100.
cursorstringOpcional
The nextCursor from the previous page. Send it with the same startTime and endTime.

Respuesta

This endpoint returns an object.
itemslist of objects
nextCursorstring or null

Pass as cursor with the same startTime and endTime to get the next page. Null on the last page.

Errores

400
Bad Request Error
401
Unauthorized Error
503
Service Unavailable Error