A valid request URL is required to generate request examples{
"message": "<string>",
"virtual_key": {
"id": "<string>",
"name": "<string>",
"value": "<string>",
"is_active": true,
"provider_configs": [
{
"id": 123,
"virtual_key_id": "<string>",
"provider": "<string>",
"weight": 123,
"allowed_models": [
"<string>"
],
"blacklisted_models": [
"<string>"
],
"allow_all_keys": true,
"keys": [
{
"id": 123,
"name": "<string>",
"provider_id": 123,
"provider": "<string>",
"key_id": "<string>",
"value": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"models": [
"<string>"
],
"weight": 123,
"enabled": true,
"use_for_batch_api": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"config_hash": "<string>",
"azure_endpoint": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"azure_client_id": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"azure_client_secret": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"azure_tenant_id": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_project_id": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_project_number": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_region": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_auth_credentials": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_access_key": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_secret_key": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_session_token": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_region": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_arn": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
}
}
],
"rate_limit_id": "<string>",
"budgets": [
{
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
}
],
"rate_limit": {
"id": "<string>",
"token_current_usage": 123,
"token_last_reset": "2023-11-07T05:31:56Z",
"request_current_usage": 123,
"request_last_reset": "2023-11-07T05:31:56Z",
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"token_max_limit": 123,
"token_reset_duration": "<string>",
"request_max_limit": 123,
"request_reset_duration": "<string>"
}
}
],
"mcp_configs": [
{
"id": 123,
"virtual_key_id": "<string>",
"mcp_client_id": 123,
"mcp_client": {
"client_id": "<string>",
"name": "<string>",
"is_code_mode_client": true,
"connection_type": "http",
"connection_string": "<string>",
"stdio_config": {
"command": "<string>",
"args": [
"<string>"
],
"envs": [
"<string>"
]
},
"tls_config": {
"insecure_skip_verify": true,
"ca_cert_pem": "<string>"
},
"auth_type": "none",
"oauth_config_id": "<string>",
"headers": {},
"tools_to_execute": [
"<string>"
],
"tools_to_auto_execute": [
"<string>"
],
"tool_pricing": {},
"allow_on_all_virtual_keys": false,
"per_user_header_keys": [
"<string>"
],
"token_exchange": {
"audience": "<string>",
"use_idp_credentials": true,
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"authorization_server_url": "<string>"
},
"disabled": false
},
"tools_to_execute": [
"<string>"
]
}
],
"calendar_aligned": true,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"previous_value_expires_at": "2023-11-07T05:31:56Z",
"rotated_at": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"customer_id": "<string>",
"rate_limit_id": "<string>",
"allow_all_providers": true,
"team": {
"id": "<string>",
"name": "<string>",
"customer_id": "<string>",
"customer": {
"id": "<string>",
"name": "<string>",
"budget_id": "<string>",
"budget": {
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
},
"teams": "<array>",
"virtual_keys": "<array>",
"virtual_key_count": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"budgets": [
{
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
}
],
"virtual_keys": "<array>",
"profile": {},
"config": {},
"claims": {},
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"customer": {
"id": "<string>",
"name": "<string>",
"budget_id": "<string>",
"budget": {
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
},
"teams": "<array>",
"virtual_keys": "<array>",
"virtual_key_count": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"budgets": [
{
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
}
],
"rate_limit": {
"id": "<string>",
"token_current_usage": 123,
"token_last_reset": "2023-11-07T05:31:56Z",
"request_current_usage": 123,
"request_last_reset": "2023-11-07T05:31:56Z",
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"token_max_limit": 123,
"token_reset_duration": "<string>",
"request_max_limit": 123,
"request_reset_duration": "<string>"
},
"assigned_user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"created_by_user_id": "<string>"
}
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>",
"error_type": "<string>"
}
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>",
"error_type": "<string>"
}
}Create virtual key
Creates a new virtual key with the specified configuration.
A valid request URL is required to generate request examples{
"message": "<string>",
"virtual_key": {
"id": "<string>",
"name": "<string>",
"value": "<string>",
"is_active": true,
"provider_configs": [
{
"id": 123,
"virtual_key_id": "<string>",
"provider": "<string>",
"weight": 123,
"allowed_models": [
"<string>"
],
"blacklisted_models": [
"<string>"
],
"allow_all_keys": true,
"keys": [
{
"id": 123,
"name": "<string>",
"provider_id": 123,
"provider": "<string>",
"key_id": "<string>",
"value": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"models": [
"<string>"
],
"weight": 123,
"enabled": true,
"use_for_batch_api": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"config_hash": "<string>",
"azure_endpoint": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"azure_client_id": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"azure_client_secret": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"azure_tenant_id": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_project_id": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_project_number": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_region": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"vertex_auth_credentials": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_access_key": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_secret_key": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_session_token": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_region": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
},
"bedrock_arn": {
"value": "<string>",
"ref": "<string>",
"type": "plain_text"
}
}
],
"rate_limit_id": "<string>",
"budgets": [
{
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
}
],
"rate_limit": {
"id": "<string>",
"token_current_usage": 123,
"token_last_reset": "2023-11-07T05:31:56Z",
"request_current_usage": 123,
"request_last_reset": "2023-11-07T05:31:56Z",
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"token_max_limit": 123,
"token_reset_duration": "<string>",
"request_max_limit": 123,
"request_reset_duration": "<string>"
}
}
],
"mcp_configs": [
{
"id": 123,
"virtual_key_id": "<string>",
"mcp_client_id": 123,
"mcp_client": {
"client_id": "<string>",
"name": "<string>",
"is_code_mode_client": true,
"connection_type": "http",
"connection_string": "<string>",
"stdio_config": {
"command": "<string>",
"args": [
"<string>"
],
"envs": [
"<string>"
]
},
"tls_config": {
"insecure_skip_verify": true,
"ca_cert_pem": "<string>"
},
"auth_type": "none",
"oauth_config_id": "<string>",
"headers": {},
"tools_to_execute": [
"<string>"
],
"tools_to_auto_execute": [
"<string>"
],
"tool_pricing": {},
"allow_on_all_virtual_keys": false,
"per_user_header_keys": [
"<string>"
],
"token_exchange": {
"audience": "<string>",
"use_idp_credentials": true,
"client_id": "<string>",
"client_secret": "<string>",
"scopes": [
"<string>"
],
"authorization_server_url": "<string>"
},
"disabled": false
},
"tools_to_execute": [
"<string>"
]
}
],
"calendar_aligned": true,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"previous_value_expires_at": "2023-11-07T05:31:56Z",
"rotated_at": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"customer_id": "<string>",
"rate_limit_id": "<string>",
"allow_all_providers": true,
"team": {
"id": "<string>",
"name": "<string>",
"customer_id": "<string>",
"customer": {
"id": "<string>",
"name": "<string>",
"budget_id": "<string>",
"budget": {
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
},
"teams": "<array>",
"virtual_keys": "<array>",
"virtual_key_count": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"budgets": [
{
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
}
],
"virtual_keys": "<array>",
"profile": {},
"config": {},
"claims": {},
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"customer": {
"id": "<string>",
"name": "<string>",
"budget_id": "<string>",
"budget": {
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
},
"teams": "<array>",
"virtual_keys": "<array>",
"virtual_key_count": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"budgets": [
{
"id": "<string>",
"max_limit": 123,
"reset_duration": "<string>",
"last_reset": "2023-11-07T05:31:56Z",
"current_usage": 123,
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reset_config": {
"quarter_start_month": 6
},
"override_amount": 123,
"override_mode": "cycles",
"override_cycles_remaining": 123,
"override_cycles_total": 123,
"override_anchor_reset": "2023-11-07T05:31:56Z",
"team_id": "<string>",
"virtual_key_id": "<string>",
"provider_config_id": 123
}
],
"rate_limit": {
"id": "<string>",
"token_current_usage": 123,
"token_last_reset": "2023-11-07T05:31:56Z",
"request_current_usage": 123,
"request_last_reset": "2023-11-07T05:31:56Z",
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"token_max_limit": 123,
"token_reset_duration": "<string>",
"request_max_limit": 123,
"request_reset_duration": "<string>"
},
"assigned_user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"created_by_user_id": "<string>"
}
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>",
"error_type": "<string>"
}
}{
"event_id": "<string>",
"type": "<string>",
"is_bifrost_error": true,
"status_code": 123,
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"event_id": "<string>"
},
"extra_fields": {
"provider": "anthropic",
"model_requested": "<string>",
"request_type": "<string>",
"error_type": "<string>"
}
}| Permission | Granted via |
|---|---|
VirtualKeys:Create | RBAC role or API key scope |
Authorizations
Management API authentication for /api/* endpoints. Use the Authorization header
with Bearer <token>, where <token> is one of:
- a Bifrost management API key,
- a dashboard session token issued by
POST /api/session/login, - base64 of
<admin-username>:<admin-password>(legacy equivalent ofBasicAuth).
Virtual keys (sk-bf-*) and the x-api-key header are not accepted on management APIs -
the sole exception is GET /api/governance/virtual-keys/quota, which is virtual-key-only.
Authentication alone is not sufficient in Bifrost Enterprise: each operation page shows a
Required Permissions table (Resource:Operation, for example Dashboard:View) above
its Authorizations section, and the caller's RBAC role or management API key scopes must
include what it lists, otherwise the request is rejected with 403 Forbidden.
A local admin — authenticated with the admin password, or any caller on a deployment with dashboard auth disabled — bypasses these checks and can call every management endpoint. See Required permissions for how permissions are derived and which endpoints are exempt.
Body
Create virtual key request
Provider configurations. When allow_all_providers is omitted or false, an empty list allows no providers (deny-by-default); when true, providers without a config are allowed with all models and keys.
Show child attributes
Show child attributes
MCP configurations (empty means no MCP tools allowed, deny-by-default)
Show child attributes
Show child attributes
Budget quotas assigned directly to this virtual key. Use this array instead of the removed singular budget or budget_id fields.
Show child attributes
Show child attributes
Create rate limit request
Show child attributes
Show child attributes
When true, this virtual key may use every configured provider. provider_configs remain optional per-provider overrides for budgets, rate limits, model allow/blacklists, and key selection.
Optional expiry timestamp. Must be in the future. Omit for a key that never expires.
Was this page helpful?

