Skip to content
Docs

API keys

Get current API key

The key you call with: its spending limit, what is left of it, and what it has spent in total, today, this week and this month. Windows are in UTC. It costs nothing to call.

GET / v1 / key
GET / v1 / key

Get current API key

The key you call with: its spending limit, what is left of it, and what it has spent in total, today, this week and this month. Windows are in UTC. 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 current API key
curl --request GET \
  --url https://api.libremodel.ai/v1/key \
  --header 'Authorization: Bearer YOUR_API_KEY'
{
  "data": {
    "label": "sk-libremodel-...a3f9",
    "limit": 50,
    "limit_remaining": 41.25,
    "limit_reset": "monthly",
    "usage": 112.4,
    "usage_daily": 1.1,
    "usage_weekly": 4.35,
    "usage_monthly": 8.75,
    "is_free_tier": false
  }
}

Authorizations

Authorizationstringheaderrequired

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

Response

application/json

The key.

  • dataobjectrequired

    The key.

    Show child attributes
    • labelstringrequired

      The key, masked.

      Example: "sk-libremodel-...a3f9"

    • limitnumber | nullrequired

      Its spending limit, in dollars, per window. null when it has none.

      Example: 50

    • limit_remainingnumber | nullrequired

      What is left of the limit in the current window.

      Example: 41.25

    • limit_resetstring | nullrequired

      When the limit starts over. null if it never does.

      Allowed values:"daily""weekly""monthly"null

    • usagenumberrequired

      Spent by this key, in total.

    • usage_dailynumberrequired

      Spent today. usage_weekly (since Monday) and usage_monthly (since the 1st) work the same way.

    • is_free_tierbooleanrequired

      true if the account has never loaded credits.