# Create organization API key div strong 🔨 In Development — This section is still being developed and may change. Generate a new API key scoped to a specific organization. The plain-text key is returned only once—store it securely immediately after creation. #### Path Parameters **`organization_id`** string required Unique identifier of the organization receiving the API key. #### Request Body **`name`** string optional Friendly label to display in the dashboard. **`monthly_limit`** number optional Monthly spending limit in CHF. Use `null` for unlimited usage. ## Returns Plain text API key value (shown once). ```text oak_prod_f8be6ea9b1a347f1ac0f9d52c1a4d83c4f5c67db2a1d4e3f ``` ## Request example ```bash curl -X POST "https://api.freddy.aitronos.com/v1/organizations/ORG_1234567890abcdef/api/new-key" \ -H "Authorization: Bearer $FREDDY_API_KEY" \ -H "Content-Type": "application/json" \ -d '{ "name": "Production backend", "monthly_limit": 2500 }' ``` ```python import requests response = requests.post( "https://api.freddy.aitronos.com/v1/organizations/ORG_1234567890abcdef/api/new-key", headers={ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" }, json={ "name": "Production backend", "monthly_limit": 2500 } ) response.raise_for_status() new_key = response.text.strip() print("Store securely:", new_key) ``` ```javascript const response = await fetch( 'https://api.freddy.aitronos.com/v1/organizations/ORG_1234567890abcdef/api/new-key', { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Production backend', monthly_limit: 2500 }) } ); if (!response.ok) { throw new Error('Failed to create API key'); } const apiKeyValue = (await response.text()).trim(); console.log('Store securely:', apiKeyValue); ``` ## Related resources - [List organization API keys](/docs/api-reference/organizations/management/api-keys/list) - [Update organization API key](/docs/api-reference/organizations/management/api-keys/update) - [Get organization usage limits](/docs/api-reference/organizations/analytics/get-usage-limit)