Get Credit Balance | Rankhog Docs
API Reference
Get Credit Balance
Return the credit balance for an organization, or for one product when websiteId is set: period credits, organization bank, committed and spendable...
Server URLhttps://api.rankhog.com/
POST
``/agent/v1/credits/balance
Send
Authorization
Body
Return the credit balance for an organization, or for one product when websiteId is set: period credits, organization bank, committed and spendable amounts, per-product balances, and the current cost table. Cache policy: live. Idempotency: none. Auth modes: api_key, mcp_oauth, session_bearer.
Authorization
apiKeyAuth
AuthorizationBearer
Rankhog organization API key sent as Authorization: Bearer rhog_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Copy
organizationId*string
Length1 <= length <= 160
websiteId?string
Length1 <= length <= 160
Response Body
200 application/json
400 application/json
401 application/json
403 application/json
404 application/json
500 application/json
cURL
JavaScript
Go
Python
Java
C#
curl -X POST "https://api.rankhog.com/agent/v1/credits/balance" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_2x9rnkhdemo",
"websiteId": "site_2x9rnkhdemo"
}'
200400401403404500
{
"agentLimit": {
"limit": 100,
"remaining": 88,
"resetsAt": "2026-12-01T00:00:00.000Z",
"spent": 12
},
"available": 212,
"bank": {
"available": 130,
"balance": 130
},
"committed": 4,
"costs": {
"comment": 0,
"draft": 1,
"draft_regeneration": 1,
"managed_proxy": 11,
"managed_proxy_mobile": 13,
"post": 0,
"reply": 0,
"upvote": 0,
"warmup": 25,
"warmup_draft": 0
},
"lowBalanceThreshold": 20,
"monthlyAllotmentPerProduct": 100,
"organizationId": "org_2x9rnkhdemo",
"period": {
"allotment": 100,
"available": 82,
"periodEnd": "2026-07-01T00:00:00.000Z",
"periodStart": "2026-06-01T00:00:00.000Z",
"remaining": 82,
"source": "stripe_subscription"
},
"products": [\
{\
"available": 212,\
"committed": 4,\
"displayName": "Example SaaS",\
"period": {\
"allotment": 100,\
"available": 82,\
"periodEnd": "2026-07-01T00:00:00.000Z",\
"periodStart": "2026-06-01T00:00:00.000Z",\
"remaining": 82,\
"source": "stripe_subscription"\
},\
"spendable": 208,\
"websiteId": "site_2x9rnkhdemo"\
}\
],
"spendable": 208,
"websiteId": "site_2x9rnkhdemo"
}
{
"error": {
"code": "agentic_invalid_input",
"details": {
"issues": [\
{\
"code": "invalid_type",\
"message": "Expected string, received undefined.",\
"path": [\
"organizationId"\
]\
}\
]
},
"message": "Request body did not match the agentic capability schema."
}
}
Missing authentication
{
"error": {
"code": "agentic_unauthorized",
"message": "Authenticate before using Rankhog agentic capabilities."
}
}
Invalid API key
Missing OAuth scope
{
"error": {
"code": "agentic_missing_scope",
"details": {
"missingScopes": [\
"rankhog:read"\
]
},
"message": "Missing required scope: rankhog:read."
}
}
API key organization mismatch
Organization access denied
{
"error": {
"code": "agentic_website_not_found",
"message": "Website workspace not found."
}
}
{
"error": {
"code": "agentic_internal_error",
"message": "Rankhog could not complete this agentic request."
}
}
Retry JobPOST\ \ Retry one failed Rankhog job as a fresh scheduled run. Only failed jobs can be retried. List Credit LedgerPOST\ \ Page through the organization credit ledger, newest first: grants, purchases, refunds, adjustments, and every debit with its actor kind and the action...