Credits
curl --request GET \
--url https://www.qwairy.co/api/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.qwairy.co/api/v1/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.qwairy.co/api/v1/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Configure data
Credits
Check the credit balance of your team, recent consumption and the estimated runway with one read request, before you start a run or add monitored prompts.
GET
https://www.qwairy.co
/
api
/
v1
/
credits
Credits
curl --request GET \
--url https://www.qwairy.co/api/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.qwairy.co/api/v1/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.qwairy.co/api/v1/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Check your balance
curl "https://www.qwairy.co/api/v1/credits" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN"
{
"success": true,
"credits": {
"balance": 1200,
"usedLast30Days": 480,
"averageDailyBurn": 16,
"runwayDays": 75,
"subTeams": null
}
}
runwayDays estimates how long the balance lasts at the current burn rate, and
is null when nothing is being consumed. For a parent organisation, subTeams
lists each sub-team balance.
Read this endpoint before starting a run, and again afterwards to see what it
reserved. Pair it with Estimate a run to
price work before committing to it. Starting a run reserves its full planned
cost. Collecting Pitch Audit responses also consumes credits as answers
complete.
Moving credits between teams and buying more are dashboard actions, not API
operations. Allocation and payment involve a human decision, so they stay in
Team Management.

