create_virtual_key
Store a provider API key as an encrypted virtual key, returning a slug for prompts/configs; save the slug since the raw key is only returned at creation.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"provider": "<provider>"
},
"name": "create_virtual_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Provider API key; omit when secret_mappings supplies key | |
| name | Yes | Display name for the virtual key | |
| note | No | Optional note or description for this key | |
| provider | Yes | Provider slug (e.g., 'openai', 'anthropic', 'azure-openai', 'google') | |
| expires_at | No | Expiration in ISO 8601 format | |
| api_version | No | API version (for Azure OpenAI) | |
| credit_limit | No | Maximum usage cost threshold | |
| workspace_id | No | Workspace ID to create the key in | |
| resource_name | No | Resource name (for Azure OpenAI) | |
| rate_limit_rpm | No | Requests per minute limit | |
| alert_threshold | No | Percentage of credit_limit at which to send alert emails (0-100) | |
| deployment_name | No | Deployment name (for Azure OpenAI) | |
| secret_mappings | No | Secret Reference mappings for key or model_config fields | |
| deployment_configurations | No | Azure deployment configurations with API versions and aliases |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Call succeeded | |
| data | No | Success payload | |
| error | No | Failure details |