post https://api.voicecreator.ai/api/v1/api-keys
Create a new API key.
This endpoint creates a new API key for the organization and returns the created key details.
Parameters:
api_key (ApiKeyCreate): The API key data to create
request (Request): The FastAPI request object
db (AsyncSession): The database session (injected)
organization_id (Optional[int]): The organization ID from the API key or request
Returns:
ApiKey: The created API key
Raises:
HTTPException:
- 400: If organization ID is missing
- 422: If there's a validation error in the request body
- 500: If an unexpected error occurs during creation