The organization's AI usage this month
curl --request GET \
--url https://app.trustivan.com/api/v1/assistant/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assistant/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/assistant/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/assistant/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"month": {
"platform_credits": 123,
"overage_credits": 123,
"platform_questions": 123,
"byok_questions": 123,
"byok_tokens": 123,
"cost_microusd": 123
},
"days": [
{
"day": "2023-11-07T05:31:56Z",
"credits": 123,
"questions": 123,
"byok_questions": 123
}
],
"recent": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"key_source": "platform",
"input_tokens": 123,
"cache_read_tokens": 123,
"cache_write_tokens": 123,
"output_tokens": 123,
"cost_microusd": 123,
"credits": 123,
"overage_credits": 123,
"created_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"credits": {
"month": "<string>",
"included": 123,
"used": 123,
"remaining": 123,
"overage_entitled": true,
"overage_enabled": true,
"overage_cap": 123,
"overage_used": 123,
"alert_percent": 0,
"credit_microusd": 123
},
"byok": {
"entitled": true,
"set": true,
"hint": "<string>",
"fingerprint": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
}
}The organization's AI usage this month
Credits (calendar month, UTC), totals by key source, spend by day for the last 31 days and the latest 50 questions. Any member.
GET
/
assistant
/
usage
The organization's AI usage this month
curl --request GET \
--url https://app.trustivan.com/api/v1/assistant/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assistant/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/assistant/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/assistant/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"month": {
"platform_credits": 123,
"overage_credits": 123,
"platform_questions": 123,
"byok_questions": 123,
"byok_tokens": 123,
"cost_microusd": 123
},
"days": [
{
"day": "2023-11-07T05:31:56Z",
"credits": 123,
"questions": 123,
"byok_questions": 123
}
],
"recent": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"key_source": "platform",
"input_tokens": 123,
"cache_read_tokens": 123,
"cache_write_tokens": 123,
"output_tokens": 123,
"cost_microusd": 123,
"credits": 123,
"overage_credits": 123,
"created_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"credits": {
"month": "<string>",
"included": 123,
"used": 123,
"remaining": 123,
"overage_entitled": true,
"overage_enabled": true,
"overage_cap": 123,
"overage_used": 123,
"alert_percent": 0,
"credit_microusd": 123
},
"byok": {
"entitled": true,
"set": true,
"hint": "<string>",
"fingerprint": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Response
The report.