Get Monthly Credit Consumption
GET
/api/v1/contracts/{project_id}/credit-consumption
const url = 'https://example.com/api/v1/contracts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/credit-consumption?backend_type=QPU&start_time=2026-04-15T12%3A00%3A00Z&end_time=2026-04-15T12%3A00%3A00Z';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/contracts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/credit-consumption?backend_type=QPU&start_time=2026-04-15T12%3A00%3A00Z&end_time=2026-04-15T12%3A00%3A00Z' \ --header 'Authorization: Bearer <token>'Return the monthly aggregation of allocated vs consumed credits for a contract, within the requested time range, ordered by month DESC.
Months with no activity are omitted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”project_id
required
Project Id
string format: uuid
Query Parameters
Section titled “Query Parameters”backend_type
required
BackendType
string
start_time
required
Start Time
string format: date-time
end_time
required
End Time
string format: date-time
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
NonPaginatedResponse[list[ProducedMonthlyCreditConsumptionResponse]]
object
data
Any of:
Array<object>
ProducedMonthlyCreditConsumptionResponseobject
date
required
Date
string format: date
allocated_credits
required
Allocated Credits
number
consumed_credits
required
Consumed Credits
number
null
Examplegenerated
{ "data": [ { "date": "2026-04-15", "allocated_credits": 1, "consumed_credits": 1 } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}