Get current API key

GET/v1/key

Choose the scope and credential first

  • One key's usage/budget: call GET /v1/key with that inference API key. Read usage, limit_remaining, and limit_reset. This is a key spending budget, not the enterprise wallet or credit balance.
  • Enterprise wallet and credit: call GET /enterprise/v1/billing/balance with a MANAGEMENT key scoped only to tenant:billing:read. Inference and PROVISIONING keys cannot use it.
  • Account charges/request reconciliation: existing GET /v1/billing and GET /v1/billing/requests/{request_id} use an inference key or signed-in JWT. Management keys cannot call these /v1 endpoints. Recorded charges and remaining balance are different metrics.
  • Legacy account balance: GET /v1/billing/balance remains compatible and reports account funds, not the calling key's remaining budget. Prefer the Enterprise endpoint for new enterprise balance monitoring.

Enterprise API guide · Get enterprise balance

Get information about the API key used to authenticate the current request.

Authentication

Authorization Bearer

Use the inference API key being monitored in the Authorization header. Management/provisioning keys and JWT sessions are not accepted.

Response

dataobject

Current API key details.

data.hashstring

Hash identifier used by management endpoints.

data.namestring

API key name.

data.labelstring

Human-readable label. Matches name.

data.disabledboolean

True when the key status is not ACTIVE or expires_at is in the past.

data.workspace_idstring

Workspace code for the key.

data.creator_user_idstring | null

Owner public UUID.

data.created_atstring

Create timestamp in UTC ISO-8601 format.

data.updated_atstring | null

Last update timestamp.

data.expires_atstring | null

UTC expiration timestamp, or null.

data.usagenumber

Total recorded spend for this key in USD.

data.usage_dailynumber

USD spend in the current UTC day.

data.usage_weeklynumber

USD spend in the current UTC week (Mon–Sun).

data.usage_monthlynumber

USD spend in the current UTC month.

data.limitnumber | null

Configured USD spend limit, or null if unlimited.

data.limit_remainingnumber | null

Remaining USD budget in the current limit window, or null if unlimited.

data.limit_resetstring | null

daily | weekly | monthly | null (lifetime).

data.is_free_tierboolean

Currently false.

data.is_management_keyboolean

False for the inference key accepted by this endpoint.

data.is_provisioning_keyboolean

Currently false.

data.rate_limitobject

Per-minute request limit metadata.

Solicitar

Shell
1curl https://api.token360.ai/v1/key \
2  -H "Authorization: Bearer sk-token360-inf-..."

Respuesta

JSON
1{
2  "data": {
3    "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
4    "name": "Analytics Service Key",
5    "label": "Analytics Service Key",
6    "disabled": false,
7    "workspace_id": "DEFAULT",
8    "creator_user_id": "00000000-0000-4000-8000-000000000001",
9    "created_at": "2026-06-04T00:00:00Z",
10    "updated_at": "2026-06-04T01:00:00Z",
11    "expires_at": null,
12    "usage": 12.34,
13    "usage_daily": 0,
14    "usage_weekly": 0,
15    "usage_monthly": 0,
16    "limit": null,
17    "limit_remaining": null,
18    "limit_reset": null,
19    "is_free_tier": false,
20    "is_management_key": false,
21    "is_provisioning_key": false,
22    "rate_limit": {
23      "interval": "minute",
24      "note": "Token-360 per-minute request limit",
25      "requests": 1000
26    }
27  }
28}
¿Ha sido de ayuda?