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

Compatibility field. Key ownership is assigned to the authenticated account.

limitnumber | null

Optional USD spend limit. Persisted and enforced on authentication (code 006 when exhausted).

limit_resetstring | null

Optional reset interval: daily, weekly, monthly, or null for lifetime. Resets at midnight UTC; weeks are Mon–Sun.

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

Credits used in the current UTC day.

data.usage_weeklynumber

Credits used in the current UTC week (Mon–Sun).

data.usage_monthlynumber

Credits used in the current UTC month.

data.limitnumber | null

Configured USD spend limit, or null if unlimited.

data.limit_remainingnumber | null

Remaining credits 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

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": 100,
18    "limit_remaining": 100,
19    "limit_reset": "weekly",
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?