Skip to main content
GET
/
v1
/
api-keys
/
sub-keys
/
me
/
usage
Get Own Usage (Sub-Key Self-Service)
curl --request GET \
  --url https://api.io.solutions/v1/api-keys/sub-keys/me/usage \
  --header 'Authorization: Bearer <token>' \
  --header 'x-api-key: <x-api-key>'
{
  "status": "succeeded",
  "data": {
    "key_id": "71775d2e-fbcc-4ef4-aa30-8aaeb82062c0",
    "credit_used": 1.234,
    "credit_limit": 10,
    "remaining_credit": 8.766,
    "credit_refresh_cycle": "monthly"
  }
}
This endpoint is authenticated with the sub-key itself, not the admin key. It is intended for scenarios where sub-key holders need to monitor their own remaining credits programmatically.
Authenticating with an admin key returns 403 Forbidden. Use GET /v1/api-keys/sub-keys/{key_id}/usage with the admin key to inspect a specific sub-key’s status.

Typical use case

A service that holds a sub-key can call this endpoint periodically to determine how much credit remains before being blocked:
curl "https://api.intelligence.io.solutions/v1/api-keys/sub-keys/me/usage" \
  -H "x-api-key: $SUB_API_KEY"
{
  "status": "succeeded",
  "data": {
    "key_id": "71775d2e-fbcc-4ef4-aa30-8aaeb82062c0",
    "credit_used": 7.82,
    "credit_limit": 10.0,
    "remaining_credit": 2.18,
    "credit_refresh_cycle": "monthly"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-api-key
string
required

The sub-API key itself (not the admin key). Sub-API key

Response

Successful Response

status
string
Example:

"succeeded"

data
KeyUsageData · object