Billing
Get the low-balance alert and this month's spending
The low-balance alert of the account a request works in, and what it spent this month (UTC).
GET
/
v1
/
account
/
spending
Get the low-balance alert and this month's spending
curl --request GET \
--url https://api.sqwish.ai/v1/account/spending \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/account/spending"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/account/spending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"low_balance_alert_usd": "<string>",
"month_spent_usd": "<string>",
"month_started_at": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console.
Get the low-balance alert and this month's spending
curl --request GET \
--url https://api.sqwish.ai/v1/account/spending \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/account/spending"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/account/spending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"low_balance_alert_usd": "<string>",
"month_spent_usd": "<string>",
"month_started_at": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}