Get billing costs
curl --request GET \
--url https://api.itoflow.ai/account/billing-costs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/account/billing-costs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/account/billing-costs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"avg_credits_per_invocation": 123,
"billing_config": {
"billing_enabled": true
},
"input_tokens": 123,
"invocation_count": 123,
"output_tokens": 123,
"period_end": "<string>",
"period_start": "<string>",
"total_credits_used": 123,
"total_duration_seconds": 123,
"total_tokens": 123,
"block_reason": "free_tier_exhausted",
"bonus_credits": 1,
"credits_included": 1,
"credits_remaining": 1,
"current_tier": "free",
"effective_credits_included": 1,
"has_payment_method": true,
"is_warning_threshold": true,
"is_within_limit": true,
"overage_credits": 1,
"overage_rate_cents_per_credit": 1,
"payg_spending_cap_cents": 1,
"payg_spent_cents": 1,
"percentage_used": 50
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}Account
Get billing costs
Agent usage and credits for the current billing period.
Operation ID: get__account_billing_costs.
GET
https://api.itoflow.ai
/
account
/
billing-costs
Get billing costs
curl --request GET \
--url https://api.itoflow.ai/account/billing-costs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/account/billing-costs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/account/billing-costs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"avg_credits_per_invocation": 123,
"billing_config": {
"billing_enabled": true
},
"input_tokens": 123,
"invocation_count": 123,
"output_tokens": 123,
"period_end": "<string>",
"period_start": "<string>",
"total_credits_used": 123,
"total_duration_seconds": 123,
"total_tokens": 123,
"block_reason": "free_tier_exhausted",
"bonus_credits": 1,
"credits_included": 1,
"credits_remaining": 1,
"current_tier": "free",
"effective_credits_included": 1,
"has_payment_method": true,
"is_warning_threshold": true,
"is_within_limit": true,
"overage_credits": 1,
"overage_rate_cents_per_credit": 1,
"payg_spending_cap_cents": 1,
"payg_spent_cents": 1,
"percentage_used": 50
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}Response
Billing costs