curl --request GET \
--url https://trylimitless.ai/v1/organization/usage/completions \
--header 'Authorization: Bearer <token>'import requests
url = "https://trylimitless.ai/v1/organization/usage/completions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://trylimitless.ai/v1/organization/usage/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"start_time": 123,
"end_time": 123,
"results": [
{
"input_tokens": 123,
"input_cached_tokens": 123,
"input_cache_write_tokens": 123,
"input_uncached_tokens": 123,
"output_tokens": 123,
"num_model_requests": 123,
"object": "organization.usage.completions.result",
"input_text_tokens": 123,
"output_text_tokens": 123,
"input_cached_text_tokens": 123,
"input_audio_tokens": 123,
"input_cached_audio_tokens": 123,
"output_audio_tokens": 123,
"input_image_tokens": 123,
"input_cached_image_tokens": 123,
"output_image_tokens": 123,
"project_id": "<string>",
"user_id": null,
"api_key_id": "<string>",
"model": "<string>",
"batch": null,
"service_tier": null
}
],
"object": "bucket"
}
],
"has_more": true,
"object": "page",
"next_page": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}Report token usage
Read UTC token-usage buckets, optionally filtered and grouped by project, API key or model. Use next_page unchanged with the same filters. Requires billing:read.
curl --request GET \
--url https://trylimitless.ai/v1/organization/usage/completions \
--header 'Authorization: Bearer <token>'import requests
url = "https://trylimitless.ai/v1/organization/usage/completions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://trylimitless.ai/v1/organization/usage/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"start_time": 123,
"end_time": 123,
"results": [
{
"input_tokens": 123,
"input_cached_tokens": 123,
"input_cache_write_tokens": 123,
"input_uncached_tokens": 123,
"output_tokens": 123,
"num_model_requests": 123,
"object": "organization.usage.completions.result",
"input_text_tokens": 123,
"output_text_tokens": 123,
"input_cached_text_tokens": 123,
"input_audio_tokens": 123,
"input_cached_audio_tokens": 123,
"output_audio_tokens": 123,
"input_image_tokens": 123,
"input_cached_image_tokens": 123,
"output_image_tokens": 123,
"project_id": "<string>",
"user_id": null,
"api_key_id": "<string>",
"model": "<string>",
"batch": null,
"service_tier": null
}
],
"object": "bucket"
}
],
"has_more": true,
"object": "page",
"next_page": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}Authorizations
Organization Admin API key with an appropriate scope. Customer keys cannot call organization routes.
Query Parameters
Report start as Unix seconds (inclusive).
x >= 0Report end as Unix seconds (exclusive); defaults to the current time.
x >= 0Length of each UTC usage bucket.
1m, 1h, 1d Filter to project IDs within your organization. Repeat this query parameter or use comma-separated IDs.
100Filter to customer key IDs. Repeat this parameter or use comma-separated IDs.
100Filter to exact model IDs.
100Bucket dimensions. Usage: project_id, api_key_id, model. Costs: project_id, api_key_id, line_item.
3Maximum records or time buckets to return.
1 <= x <= 1440Opaque next_page value from the previous report response. Keep the original report filters.
1 - 500