Get credit balance
Get the credits left for this organization and when each batch expires. Costs 0 credits.
Request examples
curl -sS "https://hitfactorapp.com/api/v1/credits/balance" \
-H "x-api-key: $HITFACTOR_API_KEY"const response = await fetch("https://hitfactorapp.com/api/v1/credits/balance", {
headers: {
"x-api-key": process.env.HITFACTOR_API_KEY!,
},
})
const { data, meta } = await response.json()
console.log(data, meta)curl -sS -X POST "https://hitfactorapp.com/api/v1/mcp" \
-H "Content-Type: application/json" \
-H "x-api-key: $HITFACTOR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "credits_balance",
"arguments": {}
}
}'Response (200 OK)
Every successful response wraps the payload in data alongside billing and request metadata in meta.
availableCreditsintegerrequiredmin: -9007199254740991max: 9007199254740991grantsobject[]requiredShow item fields
creditsRemainingintegerrequiredmin: -9007199254740991max: 9007199254740991expiresAtstringrequiredExample 200 response
{
"data": {
"availableCredits": -9007199254740991,
"grants": [
{
"creditsRemaining": 499,
"expiresAt": "2026-12-02T20:00:00.000Z"
}
]
},
"meta": {
"requestId": "req_01j9example0000000000000",
"creditsCharged": 1,
"creditsRemaining": 499,
"replayed": false
}
}Error responses
400invalid_input401Missing or invalid API key402insufficient_credits403insufficient_scope404operation_not_found409channel_sync_pending or idempotency_conflict429rate_limited