Whether Ask AI is available to the caller, and why not
curl --request GET \
--url https://app.trustivan.com/api/v1/assistant/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assistant/status"
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/status', 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/status"
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))
}{
"available": true,
"configured": true,
"entitled": true,
"enabled": true,
"store_questions": true,
"can_manage": true,
"tokens_used": 123,
"monthly_tokens": 123,
"requests_per_minute": 123,
"reason": "not_configured",
"message": "<string>",
"model": "<string>",
"key_source": "platform",
"byok": {
"entitled": true,
"set": true,
"hint": "<string>",
"fingerprint": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
},
"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
}
}Whether Ask AI is available, and why not
available is true only when the deployment has a provider key
(configured), the plan includes ai_assistant (entitled), an
admin turned it on (enabled) and the organization has budget left
this month. Otherwise reason is one of not_configured,
not_entitled, disabled, budget_exhausted, overage_cap_reached,
byok_not_entitled, and message says it in words. can_manage is
whether the caller may change the settings. key_source is which key
the next question uses (platform: the plan’s AI credits; byok: the
organization’s own Anthropic key), credits the month’s allowance and
byok the own key’s status (never the key).
GET
/
assistant
/
status
Whether Ask AI is available to the caller, and why not
curl --request GET \
--url https://app.trustivan.com/api/v1/assistant/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assistant/status"
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/status', 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/status"
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))
}{
"available": true,
"configured": true,
"entitled": true,
"enabled": true,
"store_questions": true,
"can_manage": true,
"tokens_used": 123,
"monthly_tokens": 123,
"requests_per_minute": 123,
"reason": "not_configured",
"message": "<string>",
"model": "<string>",
"key_source": "platform",
"byok": {
"entitled": true,
"set": true,
"hint": "<string>",
"fingerprint": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
},
"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
}
}Authorizations
Response
The status.