Credits
The credits a Workspace can spend. Jobs reserve credits when they start and are charged when they end: see credits.
On this page
GET/v1/credits
The credits the Workspace can spend now. Credits reserved by running jobs aren't included.
Returns
- 200The balance.
1 field
available_creditsintegerRequiredAt least 0
Errors
Example
curl https://api.filesokay.com/v1/credits \
-H "Authorization: Bearer $FILESOKAY_KEY"const res = await fetch("https://api.filesokay.com/v1/credits", {
headers: {
Authorization: `Bearer ${process.env.FILESOKAY_KEY}`,
},
});
const balance = await res.json();import os
import requests
res = requests.get(
"https://api.filesokay.com/v1/credits",
headers={
"Authorization": f"Bearer {os.environ['FILESOKAY_KEY']}",
},
)
balance = res.json(){
"available_credits": 1908
}