Returns billing usage data within the specified date range. Includes dedicated model serving, training, and model APIs usage. The date range must not exceed 31 days.
curl --request GET \
--url https://api.baseten.co/v1/billing/usage_summary \
--header "Authorization: Api-Key $BASETEN_API_KEY"{
"dedicated_usage": {
"subtotal": 123,
"credits_used": 123,
"total": 123,
"minutes": 123,
"breakdown": [
{
"billable_resource": {
"id": "<string>",
"kind": "MODEL_DEPLOYMENT",
"is_deleted": true,
"name": "<string>",
"instance_type": "<string>",
"chain_metadata": {
"chain_id": "<string>",
"chain_deployment_id": "<string>",
"chainlet_id": "<string>",
"chainlet_name": "<string>",
"chain_name": "<string>"
}
},
"subtotal": 123,
"minutes": 123,
"inference_requests": 123,
"daily": [
{
"date": "2023-12-25",
"subtotal": 123,
"minutes": 123,
"inference_requests": 123
}
]
}
]
},
"training_usage": {
"subtotal": 123,
"credits_used": 123,
"total": 123,
"minutes": 123,
"breakdown": [
{
"billable_resource": {
"id": "<string>",
"kind": "MODEL_DEPLOYMENT",
"is_deleted": true,
"name": "<string>",
"instance_type": "<string>",
"chain_metadata": {
"chain_id": "<string>",
"chain_deployment_id": "<string>",
"chainlet_id": "<string>",
"chainlet_name": "<string>",
"chain_name": "<string>"
}
},
"subtotal": 123,
"minutes": 123,
"daily": [
{
"date": "2023-12-25",
"subtotal": 123,
"minutes": 123
}
]
}
]
},
"model_apis_usage": {
"subtotal": 123,
"credits_used": 123,
"total": 123,
"breakdown": [
{
"model_name": "<string>",
"subtotal": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123,
"model_family": "<string>",
"daily": [
{
"date": "2023-12-25",
"subtotal": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
]
}
]
}
}You must specify the scheme 'Api-Key' in the Authorization header. For example, Authorization: Api-Key <Your_Api_Key>
Billing usage summary for the requested date range.
Was this page helpful?
curl --request GET \
--url https://api.baseten.co/v1/billing/usage_summary \
--header "Authorization: Api-Key $BASETEN_API_KEY"{
"dedicated_usage": {
"subtotal": 123,
"credits_used": 123,
"total": 123,
"minutes": 123,
"breakdown": [
{
"billable_resource": {
"id": "<string>",
"kind": "MODEL_DEPLOYMENT",
"is_deleted": true,
"name": "<string>",
"instance_type": "<string>",
"chain_metadata": {
"chain_id": "<string>",
"chain_deployment_id": "<string>",
"chainlet_id": "<string>",
"chainlet_name": "<string>",
"chain_name": "<string>"
}
},
"subtotal": 123,
"minutes": 123,
"inference_requests": 123,
"daily": [
{
"date": "2023-12-25",
"subtotal": 123,
"minutes": 123,
"inference_requests": 123
}
]
}
]
},
"training_usage": {
"subtotal": 123,
"credits_used": 123,
"total": 123,
"minutes": 123,
"breakdown": [
{
"billable_resource": {
"id": "<string>",
"kind": "MODEL_DEPLOYMENT",
"is_deleted": true,
"name": "<string>",
"instance_type": "<string>",
"chain_metadata": {
"chain_id": "<string>",
"chain_deployment_id": "<string>",
"chainlet_id": "<string>",
"chainlet_name": "<string>",
"chain_name": "<string>"
}
},
"subtotal": 123,
"minutes": 123,
"daily": [
{
"date": "2023-12-25",
"subtotal": 123,
"minutes": 123
}
]
}
]
},
"model_apis_usage": {
"subtotal": 123,
"credits_used": 123,
"total": 123,
"breakdown": [
{
"model_name": "<string>",
"subtotal": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123,
"model_family": "<string>",
"daily": [
{
"date": "2023-12-25",
"subtotal": 123,
"input_tokens": 123,
"output_tokens": 123,
"cached_input_tokens": 123
}
]
}
]
}
}