API Credits#
Base URL:
https://api.withoutbg.com · Spec: openapi.jsonReturn the current credit balance and expiration date for the API key.
Cost: free (does not consume credits).
Use for monitoring, dashboards, pre-flight checks, and recovering from 402 (insufficient credits) or 403 (expired credits) on paid endpoints.
Endpoint#
GET /available-credit
Base URL: https://api.withoutbg.com
Authentication#
Provide your API key in the request header:
API key header
X-API-Key: <your_api_key>Response#
Success Content-Type: application/json
Body fields#
credit(integer, required) — Credits available to spend right now.expiration_date(string, required) — When credits expire, as `YYYY-MM-DD HH:MM:SS`.
Errors#
| Status | Description | Detail |
|---|---|---|
401 | Invalid API Key | Invalid API Key |
429 | Rate limit exceeded (product policy: 30 requests/minute per API key). May be returned by the API gateway. Retry with exponential backoff. | {"error":"Too Many Requests","status":429,"message":"Rate limit exceeded. Please try again later"} |
500 | Internal Server Error | Internal Server Error. Please contact support: contact@withoutbg.com |
Example (cURL)#
cURL
curl -sS \
-H "X-API-Key: $WITHOUTBG_API_KEY" \
"https://api.withoutbg.com/available-credit"Contract sections are generated at build time from OpenAPI. Markdown mirror: /docs/pro-model/credits.md