Credit Balance
GET
/gateway/v1/me/creditsReturns the remaining credit balance of the workspace that owns the API key. Requires an API key. Free: costs 0 credits and is not recorded in usage history, but counts toward the rate limit.
Usage
Returns the remaining credits of the workspace (Personal or Team) that owns the API key. This is the same balance that Data API and Chat API calls draw from.
curl "https://api.asksurf.ai/gateway/v1/me/credits" \
-H "Authorization: Bearer $SURF_API_KEY"{
"data": { "credit_balance": 12840 },
"meta": { "credits_used": 0, "cached": false }
}- API key required. Requests without an API key, including anonymous free-tier requests, get
401 UNAUTHORIZED. - Free. The call costs 0 credits (
meta.credits_usedis always0) and is not recorded in usage history. - Rate limited. The call counts toward your per-key rate limit like any other request.
Credit Balance
OK