curl --request GET \
--url https://trylimitless.ai/v1/organization/costs \
--header 'Authorization: Bearer <token>'import requests
url = "https://trylimitless.ai/v1/organization/costs"
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/costs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"start_time": 123,
"end_time": 123,
"results": [
{
"amount": {
"value": "<string>",
"currency": "usd"
},
"object": "organization.costs.result",
"line_item": "<string>",
"project_id": "<string>",
"api_key_id": "<string>"
}
],
"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 costs
Read daily USD cost buckets, optionally grouped by project, API key or line item. Unknown unsettled usage is not a final zero-cost result. Requires billing:read.
curl --request GET \
--url https://trylimitless.ai/v1/organization/costs \
--header 'Authorization: Bearer <token>'import requests
url = "https://trylimitless.ai/v1/organization/costs"
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/costs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"start_time": 123,
"end_time": 123,
"results": [
{
"amount": {
"value": "<string>",
"currency": "usd"
},
"object": "organization.costs.result",
"line_item": "<string>",
"project_id": "<string>",
"api_key_id": "<string>"
}
],
"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 >= 0Filter 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.
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 <= 180Opaque next_page value from the previous report response. Keep the original report filters.
1 - 500