cURL
curl \
--request GET \
--url "https://api.breeze.blue/v1/usage" \
--header "xi-api-key: $BREEZE_API_KEY"import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
usage = client.account.usage(days=30, api_key_id="key_01hprod", client_type="sdk")
print(usage["summary"])import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient({
apiKey: process.env.BREEZE_API_KEY!,
});
const usage = await client.account.usage({
days: 30,
apiKeyId: "key_01hprod",
clientType: "sdk",
});
console.log(usage.summary);{
"summary": {
"request_count": 0,
"total_text_characters": 0,
"total_billable_units": 0,
"total_cost": 0,
"total_cost_millicredits": 0
},
"total": 123,
"page": 123,
"page_size": 123,
"window_days": 123,
"daily": [
{
"date": "<string>",
"request_count": 123
}
],
"items": [
{
"id": "<string>",
"endpoint": "<string>",
"method": "<string>",
"status": 123,
"api_key_id": "<string>",
"api_key_name": "<string>",
"api_key_prefix": "<string>",
"model": "<string>",
"billable_units": 123,
"cost": 123,
"cost_millicredits": 123,
"latency_ms": 123,
"duration_ms": 123,
"first_audio_chunk_ms": 123,
"request_duration_ms": 123,
"trace_id": "<string>",
"request_id": "<string>",
"text_characters": 123,
"action_code": "<string>",
"client_type": "<string>",
"client_name": "<string>",
"client_version": "<string>",
"created_at": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}Account
Get usage metering
Get aggregated usage with daily buckets and recent requests.
GET
/
v1
/
usage
cURL
curl \
--request GET \
--url "https://api.breeze.blue/v1/usage" \
--header "xi-api-key: $BREEZE_API_KEY"import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
usage = client.account.usage(days=30, api_key_id="key_01hprod", client_type="sdk")
print(usage["summary"])import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient({
apiKey: process.env.BREEZE_API_KEY!,
});
const usage = await client.account.usage({
days: 30,
apiKeyId: "key_01hprod",
clientType: "sdk",
});
console.log(usage.summary);{
"summary": {
"request_count": 0,
"total_text_characters": 0,
"total_billable_units": 0,
"total_cost": 0,
"total_cost_millicredits": 0
},
"total": 123,
"page": 123,
"page_size": 123,
"window_days": 123,
"daily": [
{
"date": "<string>",
"request_count": 123
}
],
"items": [
{
"id": "<string>",
"endpoint": "<string>",
"method": "<string>",
"status": 123,
"api_key_id": "<string>",
"api_key_name": "<string>",
"api_key_prefix": "<string>",
"model": "<string>",
"billable_units": 123,
"cost": 123,
"cost_millicredits": 123,
"latency_ms": 123,
"duration_ms": 123,
"first_audio_chunk_ms": 123,
"request_duration_ms": 123,
"trace_id": "<string>",
"request_id": "<string>",
"text_characters": 123,
"action_code": "<string>",
"client_type": "<string>",
"client_name": "<string>",
"client_version": "<string>",
"created_at": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}
