Turn AI overage on or off and set its monthly cap
curl --request PUT \
--url https://app.trustivan.com/api/v1/assistant/overage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"cap": 500000
}
'import requests
url = "https://app.trustivan.com/api/v1/assistant/overage"
payload = {
"enabled": True,
"cap": 500000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, cap: 500000})
};
fetch('https://app.trustivan.com/api/v1/assistant/overage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/assistant/overage"
payload := strings.NewReader("{\n \"enabled\": true,\n \"cap\": 500000\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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
}
}Turn AI overage on or off and set its monthly cap
With overage on (ai_overage, Team and above), questions continue past
the month’s included credits at US$0.02 per credit until cap credits
past the allowance; then they stop until the 1st (UTC). cap null is
the default, twice the allowance. Audited as
assistant.overage_updated.
PUT
/
assistant
/
overage
Turn AI overage on or off and set its monthly cap
curl --request PUT \
--url https://app.trustivan.com/api/v1/assistant/overage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"cap": 500000
}
'import requests
url = "https://app.trustivan.com/api/v1/assistant/overage"
payload = {
"enabled": True,
"cap": 500000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, cap: 500000})
};
fetch('https://app.trustivan.com/api/v1/assistant/overage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/assistant/overage"
payload := strings.NewReader("{\n \"enabled\": true,\n \"cap\": 500000\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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 after the change.