create_api_key
Generate API keys for Portkey authentication with configurable scopes, limits, and permissions for organisation or workspace access.
Instructions
Create a new Portkey API key for authentication. Organisation-level keys provide full access, workspace keys are scoped.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Key type: 'organisation' for org-wide access or 'workspace' for workspace-scoped | |
| sub_type | Yes | Sub-type: 'user' for user-associated keys or 'service' for service accounts | |
| name | Yes | Display name for the API key | |
| description | No | Optional description for the key | |
| workspace_id | No | Workspace ID (required for workspace-type keys) | |
| user_id | No | User ID (required for user sub-type keys) | |
| scopes | No | Permission scopes for the key (e.g., ['logs.read', 'analytics.read']) | |
| credit_limit | No | Credit limit for usage | |
| alert_threshold | No | Alert threshold percentage (0-100) | |
| rate_limit_rpm | No | Rate limit in requests per minute | |
| default_config_id | No | Default configuration ID to use with this key | |
| default_metadata | No | Default metadata key-value pairs | |
| alert_emails | No | Email addresses for alerts | |
| expires_at | No | Expiration date in ISO 8601 format |