Get remaining credits
curl --request GET \
--url https://nemonist.com/api/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://nemonist.com/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://nemonist.com/api/v1/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"total_credits": 100.5,
"total_usage": 25.75
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 403,
"message": "Only management keys can perform this operation"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}Credits
Get remaining credits
Get total credits purchased and used for the authenticated user. Management key required.
GET
/
credits
Get remaining credits
curl --request GET \
--url https://nemonist.com/api/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://nemonist.com/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://nemonist.com/api/v1/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"total_credits": 100.5,
"total_usage": 25.75
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 403,
"message": "Only management keys can perform this operation"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}