Get credit balance
curl --request GET \
--url https://api.peel.sh/account/credits \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.peel.sh/account/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/account/credits"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"auto_recharge_enabled": true,
"auto_recharge_monthly_limit": 1,
"auto_recharge_pack": "<string>",
"auto_recharge_threshold": 1,
"credits": 1,
"current_period_end": "<string>",
"has_subscription": true,
"is_unlimited": true,
"monthly_credits": 1,
"plan": "<string>",
"purchased_credits": 1,
"subscription_credits": 1,
"updated_at": "<string>",
"used_credits": 1,
"used_purchased_credits": 1,
"used_subscription_credits": 1,
"builds_allowance": 1,
"builds_remaining": 1,
"builds_used": 1,
"daily_run_cap": 2,
"payment_status": "ok",
"period_start": "<string>",
"plan_id": "free",
"runs_allowance": 1,
"runs_remaining": 1,
"runs_today": 1,
"usage_alerts": [
50
],
"monthly_summary": true
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}Account
Get credit balance
Returns the account run balance (credits), plan, build and run allowances and billing period. Runs and credits are the same unit; the run fields are aliases added for the plan and allowance model.
GET
/
account
/
credits
Get credit balance
curl --request GET \
--url https://api.peel.sh/account/credits \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.peel.sh/account/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/account/credits"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"auto_recharge_enabled": true,
"auto_recharge_monthly_limit": 1,
"auto_recharge_pack": "<string>",
"auto_recharge_threshold": 1,
"credits": 1,
"current_period_end": "<string>",
"has_subscription": true,
"is_unlimited": true,
"monthly_credits": 1,
"plan": "<string>",
"purchased_credits": 1,
"subscription_credits": 1,
"updated_at": "<string>",
"used_credits": 1,
"used_purchased_credits": 1,
"used_subscription_credits": 1,
"builds_allowance": 1,
"builds_remaining": 1,
"builds_used": 1,
"daily_run_cap": 2,
"payment_status": "ok",
"period_start": "<string>",
"plan_id": "free",
"runs_allowance": 1,
"runs_remaining": 1,
"runs_today": 1,
"usage_alerts": [
50
],
"monthly_summary": true
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}Response
Current credit state.
⌘I