Get Credits
curl --request GET \
--url https://api.shuyou.ai/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shuyou.ai/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://api.shuyou.ai/v1/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"total_credits": 100,
"total_usage": 25,
"balance": 75
}
}
Account Management
Get Credits
Query account credit balance via GET /v1/credits.
GET
/
v1
/
credits
Get Credits
curl --request GET \
--url https://api.shuyou.ai/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shuyou.ai/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://api.shuyou.ai/v1/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"total_credits": 100,
"total_usage": 25,
"balance": 75
}
}
Response fields
| Field | Type | Description |
|---|---|---|
data.total_credits | number | Total credits allocated to the account. |
data.total_usage | number | Total credits consumed. |
data.balance | number | Remaining credit balance (total_credits − total_usage). |
{
"data": {
"total_credits": 100,
"total_usage": 25,
"balance": 75
}
}