A valid request URL is required to generate request examples{
"virtual_key_name": "<string>",
"is_active": true,
"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",
"per_model_usage": [
{
"model": "<string>",
"total_requests": 123,
"total_tokens": 123,
"total_cost": 123,
"provider": "<string>"
}
],
"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,
"source_type": "<string>",
"source_id": "<string>",
"source_name": "<string>"
}
],
"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>"
},
"rate_limits": [
{
"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>",
"source_type": "<string>",
"source_id": "<string>",
"source_name": "<string>"
}
],
"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": "<string>",
"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": "<string>",
"azure_client_id": "<string>",
"azure_client_secret": "<string>",
"azure_tenant_id": "<string>",
"vertex_project_id": "<string>",
"vertex_project_number": "<string>",
"vertex_region": "<string>",
"vertex_auth_credentials": "<string>",
"bedrock_access_key": "<string>",
"bedrock_secret_key": "<string>",
"bedrock_session_token": "<string>",
"bedrock_region": "<string>",
"bedrock_arn": "<string>"
}
],
"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>"
}
}
],
"model_configs": [
{
"model_name": "<string>",
"provider": "<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>"
}
}
]
}{
"error": "<string>"
}{
"error": "<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>",
"retry_after_ms": 150500
}
}Get virtual key quota
Returns the overall budget and rate limit quota for the authenticated virtual key, as well as per-provider and per-model budgets and rate limits (with current usage). Each budget also carries the actual per-model usage for its current cycle. This is a self-service endpoint - no admin authentication required. The virtual key value itself (provided via header) is the credential. During an active rotation grace window (client vk_rotation_cooldown), the previous key value also authenticates until previous_value_expires_at. An expired virtual key is rejected with 403; an inactive one still returns its quota with is_active false.
A valid request URL is required to generate request examples{
"virtual_key_name": "<string>",
"is_active": true,
"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",
"per_model_usage": [
{
"model": "<string>",
"total_requests": 123,
"total_tokens": 123,
"total_cost": 123,
"provider": "<string>"
}
],
"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,
"source_type": "<string>",
"source_id": "<string>",
"source_name": "<string>"
}
],
"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>"
},
"rate_limits": [
{
"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>",
"source_type": "<string>",
"source_id": "<string>",
"source_name": "<string>"
}
],
"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": "<string>",
"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": "<string>",
"azure_client_id": "<string>",
"azure_client_secret": "<string>",
"azure_tenant_id": "<string>",
"vertex_project_id": "<string>",
"vertex_project_number": "<string>",
"vertex_region": "<string>",
"vertex_auth_credentials": "<string>",
"bedrock_access_key": "<string>",
"bedrock_secret_key": "<string>",
"bedrock_session_token": "<string>",
"bedrock_region": "<string>",
"bedrock_arn": "<string>"
}
],
"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>"
}
}
],
"model_configs": [
{
"model_name": "<string>",
"provider": "<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>"
}
}
]
}{
"error": "<string>"
}{
"error": "<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>",
"retry_after_ms": 150500
}
}| Permission | Granted via |
|---|---|
| None | Not RBAC-gated - authorized by the credential below |
Authorizations
Bifrost Virtual Key for governance, routing, and access control. Supported on all inference endpoints (/v1/*, /openai/*, /anthropic/*, /bedrock/*, /cohere/*, /genai/*, /langchain/*, /litellm/*, /pydanticai/*, /mcp), not on management APIs (/api/*) - with the single
exception of the self-service GET /api/governance/virtual-keys/quota, where the virtual key is the credential.
Example: sk-bf-* prefixed keys.
Response
Successful response
Virtual key quota response (self-service, no admin auth required)
Name of the virtual key
Whether the virtual key is active
Overall budget quotas for this virtual key. Each budget also carries the actual per-model spend (from request logs) accumulated in its current cycle.
Show child attributes
Show child attributes
The single effective rate limit for this key. For a key managed by an enterprise access profile this is the tightest-per-dimension merge of every profile governing the key, and carries the real usage. Kept for readers that expect one value; see rate_limits for the unmerged list.
Show child attributes
Show child attributes
Every rate limit rate_limit was merged from, each tagged with its source, so a caller can see which one is actually binding rather than only the merged result. A user may hold several enterprise access profiles at once, each contributing its own rate limit, so this can carry more than one entry. Always present; empty when the key has no rate limit at all.
Show child attributes
Show child attributes
Per-provider budget quotas and rate limits (provider-level splits and limits)
Show child attributes
Show child attributes
Per-model budget quotas and rate limits configured for this virtual key (model-level limits). Always an array — the endpoint fails closed (500) rather than returning null when the model-config lookup errors.
Show child attributes
Show child attributes
Was this page helpful?

