curl --request PUT \
--url https://aquila.attaxr.com/api/budget \
--header 'Content-Type: application/json' \
--cookie better-auth.session_token= \
--data '
{
"provider": "<string>",
"model": "<string>",
"dailyTokenLimit": 500000000
}
'const options = {
method: 'PUT',
headers: {cookie: 'better-auth.session_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', model: '<string>', dailyTokenLimit: 500000000})
};
fetch('https://aquila.attaxr.com/api/budget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/budget"
payload = {
"provider": "<string>",
"model": "<string>",
"dailyTokenLimit": 500000000
}
headers = {
"cookie": "better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Save one budget entry
Sets the budget cap for one scope — provider '', model '' is the across-all-providers-and-models budget, (provider, ’*’) covers every model of one provider, and (provider, model) caps exactly one model. A null dailyTokenLimit disables (removes) the budget at that scope. The cap is enforced against the provider’s own reported usage for its active spend window (the five-hour session window coding plans enforce); when the cap exceeds the provider’s window allowance the response flags overProviderLimit so the UI can warn. Applies from the next model call; a reached limit pauses AI processing for that scope until the provider’s window reset.
curl --request PUT \
--url https://aquila.attaxr.com/api/budget \
--header 'Content-Type: application/json' \
--cookie better-auth.session_token= \
--data '
{
"provider": "<string>",
"model": "<string>",
"dailyTokenLimit": 500000000
}
'const options = {
method: 'PUT',
headers: {cookie: 'better-auth.session_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', model: '<string>', dailyTokenLimit: 500000000})
};
fetch('https://aquila.attaxr.com/api/budget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/budget"
payload = {
"provider": "<string>",
"model": "<string>",
"dailyTokenLimit": 500000000
}
headers = {
"cookie": "better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Browser session cookie set by Better Auth sign-in.
Body
Response
The saved scope, its live status, and the provider-window warning flags.

