Create a new API key for your organization.
POSThttps://api.aitronos.com/v1/organizations/{org_id}/api-keys
org_id string required
The organization ID.
key_name string required
A descriptive name for the API key.
usage_limit_chf number optional
Usage limit in CHF. Default is unlimited.
scopes array optional
Array of permission scopes for the key.
expires_at string optional
Optional expiration timestamp in ISO 8601 format.
An API key object with the raw key value. Important: The raw API key is shown ONCE only upon creation and must be stored securely by the client.
Bash
- Bash
- Python
curl "https://api.aitronos.com/v1/organizations/org_123abc/api-keys" \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"key_name": "Production API Key"
}'Response:
{
"id": "ak_123abc456def789",
"key": "oak_live_a1b2c3d4e5f6789012345678901234567890123456789012345678",
"key_prefix": "oak_live_a1b2",
"organization_id": "org_123abc",
"key_name": "Production API Key",
"is_active": true,
"usage_limit_chf": null,
"scopes": ["read:usage"],
"created_by": "usr_456def",
"created_at": "2025-11-05T10:00:00Z",
"expires_at": null
}