Skip to main content
GET
/
v1
/
api-keys
/
sub-keys
/
usage
Get All Sub-Keys Usage
curl --request GET \
  --url https://api.io.solutions/v1/api-keys/sub-keys/usage \
  --header 'Authorization: Bearer <token>' \
  --header 'x-api-key: <x-api-key>'
{
  "status": "succeeded",
  "data": {
    "keys": [
      {
        "api_key_id": "71775d2e-fbcc-4ef4-aa30-8aaeb82062c0",
        "description": "Partner integration key",
        "display": "acme-v2-eyJh...c0eQ",
        "today": {
          "models": [
            {
              "model_name": "meta-llama/Llama-3.3-70B-Instruct",
              "input_tokens": 1500,
              "output_tokens": 320,
              "credit_cost": 0.000024
            }
          ],
          "total_input_tokens": 1500,
          "total_output_tokens": 320,
          "total_credit_cost": 0.000024
        },
        "all_time": {
          "models": [
            {
              "model_name": "meta-llama/Llama-3.3-70B-Instruct",
              "input_tokens": 48000,
              "output_tokens": 12000,
              "credit_cost": 0.000834
            }
          ],
          "total_input_tokens": 48000,
          "total_output_tokens": 12000,
          "total_credit_cost": 0.000834
        }
      }
    ],
    "totals": {
      "today_credit_cost": 0.000024,
      "all_time_credit_cost": 0.000834
    }
  }
}
This endpoint is designed for admin-level billing dashboards. It returns a breakdown per sub-key, with each entry showing:
  • today — token consumption and credit cost since midnight UTC.
  • all_time — cumulative consumption since the sub-key was created.
  • totals — aggregate today_credit_cost and all_time_credit_cost across all sub-keys.
Each entry’s models array shows which models were used and their individual costs, allowing you to see exactly where credits are being spent.
This endpoint requires the Intelligence database to be reachable. It returns 503 Service Unavailable if the intelligence database is temporarily unavailable.

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

Admin API key. Admin API key (io.net Intelligence)

Response

Successful Response

status
string
Example:

"succeeded"

data
AllKeysUsageData · object