Get usage
GET
https://app.sulus.ai/api/v1/usage
Prepaid-USD balance and account counts
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Errors
| Status | Meaning | Body |
|---|---|---|
401 |
Missing or invalid bearer token | |
403 |
Feature ai_chat not enabled for the account |
Notes
- balance_tokens is the prepaid USD balance (same unit as wallet USD). balance_tokens and balance_usd are null when prepaid billing is not active for the account.
curl --request GET \
--url https://app.sulus.ai/api/v1/usage \
--header 'Authorization: Bearer <YOUR_API_KEY>'
import requests
url = "https://app.sulus.ai/api/v1/usage"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://app.sulus.ai/api/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"object": "usage",
"billing_active": true,
"balance_tokens": 1250000,
"balance_usd": 6.25,
"agents": 4,
"chats": 31
}
Response — GET
/usage
200
{
"object": "usage",
"billing_active": true,
"balance_tokens": 1250000,
"balance_usd": 6.25,
"agents": 4,
"chats": 31
}