Skip to content
Docs

Credits

Get remaining credits

What the account of the key has loaded and spent, in dollars. Your balance is total_credits minus total_usage. It costs nothing to call.

GET / v1 / credits
GET / v1 / credits

Get remaining credits

What the account of the key has loaded and spent, in dollars. Your balance is total_credits minus total_usage. It costs nothing to call.

Authorizations

Authorizationstring<bearer>required

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Your key stays in this page and is only sent with this request. Get an API key

Get remaining credits
curl --request GET \
  --url https://api.libremodel.ai/v1/credits \
  --header 'Authorization: Bearer YOUR_API_KEY'
{
  "data": {
    "total_credits": 25,
    "total_usage": 3.4182
  }
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Response

application/json

The totals of the account.

  • dataobjectrequired

    The totals.

    Show child attributes
    • total_creditsnumberrequired

      Everything loaded: top-ups and adjustments.

      Example: 25

    • total_usagenumberrequired

      Everything spent, by every key of the account.

      Example: 3.4182