create_virtual_key
Encrypt and store a provider API key as a virtual key. Returns a slug for use in prompts and configs, with optional usage and rate limits.
Instructions
Store a provider API key as a virtual key. The raw key is encrypted and only returned at creation time, so save the returned slug and use it in prompts/configs. Optional usage and rate limits apply immediately, and the tool returns the new slug.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name for the virtual key | |
| provider | Yes | Provider slug (e.g., 'openai', 'anthropic', 'azure-openai', 'google') | |
| key | Yes | The actual provider API key to store | |
| note | No | Optional note or description for this key | |
| workspace_id | No | Workspace ID to create the key in | |
| api_version | No | API version (for Azure OpenAI) | |
| resource_name | No | Resource name (for Azure OpenAI) | |
| deployment_name | No | Deployment name (for Azure OpenAI) | |
| credit_limit | No | Maximum usage cost threshold | |
| alert_threshold | No | Percentage of credit_limit at which to send alert emails (0-100) | |
| rate_limit_rpm | No | Requests per minute limit |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |