Create API key

POST/v1/keys

Create a new Token360 inference API key.

The raw API key is returned once in the key field. Store it securely; later responses only include the key hash.

Authentication

Authorization Bearer

Use either a Token360 API key (sk-token360-...) or a signed-in user JWT.

Request Body

namestringrequired

Name for the new API key.

workspace_idstring

Workspace code. Defaults to DEFAULT.

expires_atstring | null

Optional UTC ISO-8601 expiration timestamp, such as 2029-11-30T23:59:59Z. Non-UTC offsets are rejected.

creator_user_idstring | null

Accepted but ignored.

limitnumber | null

Accepted but not persisted.

limit_resetstring | null

Accepted but not persisted.

Response

keystring

Raw API key, shown only once.

dataobject

Created 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 user ID.

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 Token360 credit usage in USD.

data.usage_dailynumber

Daily usage. Currently 0.

data.usage_weeklynumber

Weekly usage. Currently 0.

data.usage_monthlynumber

Monthly usage. Currently 0.

data.limitnumber | null

Spending limit. Currently null.

data.limit_remainingnumber | null

Remaining spending limit. Currently null.

data.limit_resetstring | null

Limit reset interval. Currently null.

data.is_free_tierboolean

Currently false.

data.is_management_keyboolean

Currently true for these management responses.

data.is_provisioning_keyboolean

Currently false.

data.rate_limitobject

Per-minute request limit metadata.

Request

Shell
1curl -X POST https://api.token360.ai/v1/keys \
2  -H "Authorization: Bearer sk-token360-inf-..." \
3  -H "Content-Type: application/json" \
4  -d '{
5    "name": "Analytics Service Key",
6    "workspace_id": "DEFAULT",
7    "expires_at": "2029-11-30T23:59:59Z",
8    "limit": 100,
9    "limit_reset": "weekly"
10  }'

Response

JSON
1{
2  "key": "sk-token360-inf-...",
3  "data": {
4    "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
5    "name": "Analytics Service Key",
6    "label": "Analytics Service Key",
7    "disabled": false,
8    "workspace_id": "DEFAULT",
9    "creator_user_id": "42",
10    "created_at": "2026-06-04T00:00:00Z",
11    "updated_at": "2026-06-04T00:00:00Z",
12    "expires_at": "2029-11-30T23:59:59Z",
13    "usage": 0,
14    "usage_daily": 0,
15    "usage_weekly": 0,
16    "usage_monthly": 0,
17    "limit": null,
18    "limit_remaining": null,
19    "limit_reset": null,
20    "is_free_tier": false,
21    "is_management_key": true,
22    "is_provisioning_key": false,
23    "rate_limit": {
24      "interval": "minute",
25      "note": "Token-360 per-minute request limit",
26      "requests": 1000
27    }
28  }
29}
Was this page helpful?