A valid request URL is required to generate request examples{
"message": "<string>",
"pricing_override": {
"id": "<string>",
"name": "<string>",
"scope_kind": "global",
"user_id": "<string>",
"virtual_key_id": "<string>",
"provider_id": "<string>",
"provider_key_id": "<string>",
"match_type": "exact",
"pattern": "<string>",
"request_types": [
"chat_completion"
],
"pricing_patch": "<string>",
"patch": {
"input_cost_per_token": 1,
"output_cost_per_token": 1,
"input_cost_per_token_batches": 1,
"output_cost_per_token_batches": 1,
"input_cost_per_token_priority": 1,
"output_cost_per_token_priority": 1,
"input_cost_per_token_ultrafast": 1,
"output_cost_per_token_ultrafast": 1,
"input_cost_per_token_flex": 1,
"output_cost_per_token_flex": 1,
"input_cost_per_token_decisions": 1,
"output_cost_per_token_decisions": 1,
"input_cost_per_token_fast": 1,
"output_cost_per_token_fast": 1,
"input_cost_per_character": 1,
"input_cost_per_token_above_128k_tokens": 1,
"input_cost_per_image_above_128k_tokens": 1,
"input_cost_per_video_per_second_above_128k_tokens": 1,
"input_cost_per_audio_per_second_above_128k_tokens": 1,
"output_cost_per_token_above_128k_tokens": 1,
"input_cost_per_token_above_100k_tokens": 1,
"output_cost_per_token_above_100k_tokens": 1,
"input_cost_per_token_above_200k_tokens": 1,
"input_cost_per_token_above_200k_tokens_priority": 1,
"output_cost_per_token_above_200k_tokens": 1,
"output_cost_per_token_above_200k_tokens_priority": 1,
"input_cost_per_token_above_272k_tokens": 1,
"input_cost_per_token_above_272k_tokens_priority": 1,
"input_cost_per_token_flex_above_272k_tokens": 1,
"output_cost_per_token_above_272k_tokens": 1,
"output_cost_per_token_above_272k_tokens_priority": 1,
"output_cost_per_token_flex_above_272k_tokens": 1,
"input_cost_per_token_above_272k_tokens_ultrafast": 1,
"output_cost_per_token_above_272k_tokens_ultrafast": 1,
"cache_creation_input_token_cost": 1,
"cache_read_input_token_cost": 1,
"cache_creation_input_token_cost_above_200k_tokens": 1,
"cache_read_input_token_cost_above_200k_tokens": 1,
"cache_read_input_token_cost_above_200k_tokens_priority": 1,
"cache_creation_input_token_cost_above_1hr": 1,
"cache_creation_input_token_cost_above_1hr_above_200k_tokens": 1,
"cache_creation_input_token_cost_above_100k_tokens": 1,
"cache_read_input_token_cost_above_100k_tokens": 1,
"cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1,
"cache_creation_input_audio_token_cost": 1,
"cache_read_input_token_cost_priority": 1,
"cache_read_input_token_cost_ultrafast": 1,
"cache_read_input_token_cost_flex": 1,
"cache_read_input_image_token_cost": 1,
"cache_read_input_token_cost_above_272k_tokens": 1,
"cache_read_input_token_cost_above_272k_tokens_priority": 1,
"cache_read_input_token_cost_flex_above_272k_tokens": 1,
"cache_read_input_token_cost_above_272k_tokens_ultrafast": 1,
"cache_creation_input_token_cost_above_272k_tokens": 1,
"cache_creation_input_token_cost_flex": 1,
"cache_creation_input_token_cost_flex_above_272k_tokens": 1,
"cache_creation_input_token_cost_priority": 1,
"cache_creation_input_token_cost_above_272k_tokens_priority": 1,
"cache_creation_input_token_cost_ultrafast": 1,
"cache_creation_input_token_cost_above_272k_tokens_ultrafast": 1,
"cache_creation_input_token_cost_fast": 1,
"cache_creation_input_token_cost_above_1hr_fast": 1,
"cache_read_input_token_cost_fast": 1,
"input_cost_per_image": 1,
"input_cost_per_pixel": 1,
"output_cost_per_image": 1,
"output_cost_per_pixel": 1,
"output_cost_per_image_premium_image": 1,
"output_cost_per_image_above_512_and_512_pixels": 1,
"output_cost_per_image_above_512_and_512_pixels_and_premium_image": 1,
"output_cost_per_image_above_1024_and_1024_pixels": 1,
"output_cost_per_image_above_1024_and_1024_pixels_and_premium_image": 1,
"output_cost_per_image_above_1024_and_1536_pixels": 1,
"output_cost_per_image_above_1536_and_1024_pixels": 1,
"output_cost_per_image_above_2048_and_2048_pixels": 1,
"output_cost_per_image_above_4096_and_4096_pixels": 1,
"output_cost_per_image_above_4_megapixels": 1,
"output_cost_per_image_above_8_megapixels": 1,
"output_cost_per_image_above_16_megapixels": 1,
"output_cost_per_image_above_32_megapixels": 1,
"output_cost_per_image_above_64_megapixels": 1,
"output_cost_per_image_low_quality": 1,
"output_cost_per_image_medium_quality": 1,
"output_cost_per_image_high_quality": 1,
"output_cost_per_image_auto_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_low_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_low_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_low_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_medium_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_medium_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_medium_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_high_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_high_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_high_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_standard_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_standard_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_standard_quality": 1,
"input_cost_per_image_token": 1,
"output_cost_per_image_token": 1,
"input_cost_per_audio_token": 1,
"input_cost_per_audio_per_second": 1,
"input_cost_per_second": 1,
"input_cost_per_video_per_second": 1,
"output_cost_per_audio_token": 1,
"output_cost_per_video_per_second": 1,
"output_cost_per_second": 1,
"input_cost_per_token_voice_live": 1,
"output_cost_per_token_voice_live": 1,
"cache_read_input_token_cost_voice_live": 1,
"input_cost_per_audio_token_voice_live": 1,
"output_cost_per_audio_token_voice_live": 1,
"input_cost_per_standard_speech_audio_token_voice_live": 1,
"output_cost_per_standard_speech_audio_token_voice_live": 1,
"input_cost_per_custom_speech_audio_token_voice_live": 1,
"output_cost_per_custom_speech_audio_token_voice_live": 1,
"output_cost_per_video_per_second_480p": 1,
"output_cost_per_video_per_second_720p": 1,
"output_cost_per_video_per_second_1024p": 1,
"output_cost_per_video_per_second_1080p": 1,
"output_cost_per_video_per_second_4k": 1,
"output_cost_per_video_token": 1,
"web_search_cost_per_request": 1,
"input_cost_per_query": 1,
"code_interpreter_cost_per_session": 1,
"inference_geo_us_multiplier": 1,
"cost_per_request": 1,
"ocr_cost_per_page": 1,
"annotation_cost_per_page": 1,
"off_peak_cost_multiplier": 0,
"peak_hours": {
"windows": [
{
"days": [
1,
2,
3,
4,
5
],
"start": "01:00",
"end": "04:00"
}
],
"timezone": "UTC"
}
},
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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": {
"routing_info": {
"provider": "anthropic",
"model": "<string>",
"key": "<string>",
"resolved_key_alias": {
"model_id": "<string>",
"model_name": "<string>",
"model_family": "<string>"
},
"is_fallback": true,
"primary_provider": "anthropic",
"primary_model": "<string>",
"requested_provider": "anthropic",
"requested_model": "<string>",
"server_side_fallback_model": "<string>"
},
"provider": "anthropic",
"original_model_requested": "<string>",
"resolved_model_used": "<string>",
"request_type": "<string>",
"mcp_request_type": "<string>",
"a2a_request_type": "<string>",
"a2a_agent_name": "<string>",
"error_type": "<string>",
"retry_after_ms": 150500,
"raw_request": "<unknown>",
"raw_response": "<unknown>",
"converted_request_type": "<string>",
"dropped_compat_plugin_params": [
"<string>"
],
"latency": 123,
"key_statuses": [
{
"key_id": "<string>",
"status": "success",
"provider": "anthropic",
"error": "<unknown>"
}
],
"mcp_auth_required": {
"kind": "<string>",
"mcp_client_id": "<string>",
"mcp_client_name": "<string>",
"message": "<string>",
"authorize_url": "<string>",
"session_id": "<string>",
"subject_token_missing": true,
"exchange_error": "<string>"
},
"billed_usage": {
"prompt_tokens": 123,
"prompt_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123,
"cached_read_tokens": 123,
"cached_write_tokens": 123
},
"completion_tokens": 123,
"completion_tokens_details": {
"text_tokens": 123,
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123,
"image_tokens": 123,
"rejected_prediction_tokens": 123
},
"total_tokens": 123,
"tool_usage": {
"web_search": {
"num_requests": 123
}
},
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"reasoning_tokens_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123,
"request_cost": 123,
"total_cost": 123
}
}
}
}{
"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": {
"routing_info": {
"provider": "anthropic",
"model": "<string>",
"key": "<string>",
"resolved_key_alias": {
"model_id": "<string>",
"model_name": "<string>",
"model_family": "<string>"
},
"is_fallback": true,
"primary_provider": "anthropic",
"primary_model": "<string>",
"requested_provider": "anthropic",
"requested_model": "<string>",
"server_side_fallback_model": "<string>"
},
"provider": "anthropic",
"original_model_requested": "<string>",
"resolved_model_used": "<string>",
"request_type": "<string>",
"mcp_request_type": "<string>",
"a2a_request_type": "<string>",
"a2a_agent_name": "<string>",
"error_type": "<string>",
"retry_after_ms": 150500,
"raw_request": "<unknown>",
"raw_response": "<unknown>",
"converted_request_type": "<string>",
"dropped_compat_plugin_params": [
"<string>"
],
"latency": 123,
"key_statuses": [
{
"key_id": "<string>",
"status": "success",
"provider": "anthropic",
"error": "<unknown>"
}
],
"mcp_auth_required": {
"kind": "<string>",
"mcp_client_id": "<string>",
"mcp_client_name": "<string>",
"message": "<string>",
"authorize_url": "<string>",
"session_id": "<string>",
"subject_token_missing": true,
"exchange_error": "<string>"
},
"billed_usage": {
"prompt_tokens": 123,
"prompt_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123,
"cached_read_tokens": 123,
"cached_write_tokens": 123
},
"completion_tokens": 123,
"completion_tokens_details": {
"text_tokens": 123,
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123,
"image_tokens": 123,
"rejected_prediction_tokens": 123
},
"total_tokens": 123,
"tool_usage": {
"web_search": {
"num_requests": 123
}
},
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"reasoning_tokens_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123,
"request_cost": 123,
"total_cost": 123
}
}
}
}{
"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": {
"routing_info": {
"provider": "anthropic",
"model": "<string>",
"key": "<string>",
"resolved_key_alias": {
"model_id": "<string>",
"model_name": "<string>",
"model_family": "<string>"
},
"is_fallback": true,
"primary_provider": "anthropic",
"primary_model": "<string>",
"requested_provider": "anthropic",
"requested_model": "<string>",
"server_side_fallback_model": "<string>"
},
"provider": "anthropic",
"original_model_requested": "<string>",
"resolved_model_used": "<string>",
"request_type": "<string>",
"mcp_request_type": "<string>",
"a2a_request_type": "<string>",
"a2a_agent_name": "<string>",
"error_type": "<string>",
"retry_after_ms": 150500,
"raw_request": "<unknown>",
"raw_response": "<unknown>",
"converted_request_type": "<string>",
"dropped_compat_plugin_params": [
"<string>"
],
"latency": 123,
"key_statuses": [
{
"key_id": "<string>",
"status": "success",
"provider": "anthropic",
"error": "<unknown>"
}
],
"mcp_auth_required": {
"kind": "<string>",
"mcp_client_id": "<string>",
"mcp_client_name": "<string>",
"message": "<string>",
"authorize_url": "<string>",
"session_id": "<string>",
"subject_token_missing": true,
"exchange_error": "<string>"
},
"billed_usage": {
"prompt_tokens": 123,
"prompt_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123,
"cached_read_tokens": 123,
"cached_write_tokens": 123
},
"completion_tokens": 123,
"completion_tokens_details": {
"text_tokens": 123,
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123,
"image_tokens": 123,
"rejected_prediction_tokens": 123
},
"total_tokens": 123,
"tool_usage": {
"web_search": {
"num_requests": 123
}
},
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"reasoning_tokens_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123,
"request_cost": 123,
"total_cost": 123
}
}
}
}Update pricing override
Updates an existing pricing override. Omitted fields are merged from the existing record. The patch field is always replaced in full when provided.
A valid request URL is required to generate request examples{
"message": "<string>",
"pricing_override": {
"id": "<string>",
"name": "<string>",
"scope_kind": "global",
"user_id": "<string>",
"virtual_key_id": "<string>",
"provider_id": "<string>",
"provider_key_id": "<string>",
"match_type": "exact",
"pattern": "<string>",
"request_types": [
"chat_completion"
],
"pricing_patch": "<string>",
"patch": {
"input_cost_per_token": 1,
"output_cost_per_token": 1,
"input_cost_per_token_batches": 1,
"output_cost_per_token_batches": 1,
"input_cost_per_token_priority": 1,
"output_cost_per_token_priority": 1,
"input_cost_per_token_ultrafast": 1,
"output_cost_per_token_ultrafast": 1,
"input_cost_per_token_flex": 1,
"output_cost_per_token_flex": 1,
"input_cost_per_token_decisions": 1,
"output_cost_per_token_decisions": 1,
"input_cost_per_token_fast": 1,
"output_cost_per_token_fast": 1,
"input_cost_per_character": 1,
"input_cost_per_token_above_128k_tokens": 1,
"input_cost_per_image_above_128k_tokens": 1,
"input_cost_per_video_per_second_above_128k_tokens": 1,
"input_cost_per_audio_per_second_above_128k_tokens": 1,
"output_cost_per_token_above_128k_tokens": 1,
"input_cost_per_token_above_100k_tokens": 1,
"output_cost_per_token_above_100k_tokens": 1,
"input_cost_per_token_above_200k_tokens": 1,
"input_cost_per_token_above_200k_tokens_priority": 1,
"output_cost_per_token_above_200k_tokens": 1,
"output_cost_per_token_above_200k_tokens_priority": 1,
"input_cost_per_token_above_272k_tokens": 1,
"input_cost_per_token_above_272k_tokens_priority": 1,
"input_cost_per_token_flex_above_272k_tokens": 1,
"output_cost_per_token_above_272k_tokens": 1,
"output_cost_per_token_above_272k_tokens_priority": 1,
"output_cost_per_token_flex_above_272k_tokens": 1,
"input_cost_per_token_above_272k_tokens_ultrafast": 1,
"output_cost_per_token_above_272k_tokens_ultrafast": 1,
"cache_creation_input_token_cost": 1,
"cache_read_input_token_cost": 1,
"cache_creation_input_token_cost_above_200k_tokens": 1,
"cache_read_input_token_cost_above_200k_tokens": 1,
"cache_read_input_token_cost_above_200k_tokens_priority": 1,
"cache_creation_input_token_cost_above_1hr": 1,
"cache_creation_input_token_cost_above_1hr_above_200k_tokens": 1,
"cache_creation_input_token_cost_above_100k_tokens": 1,
"cache_read_input_token_cost_above_100k_tokens": 1,
"cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1,
"cache_creation_input_audio_token_cost": 1,
"cache_read_input_token_cost_priority": 1,
"cache_read_input_token_cost_ultrafast": 1,
"cache_read_input_token_cost_flex": 1,
"cache_read_input_image_token_cost": 1,
"cache_read_input_token_cost_above_272k_tokens": 1,
"cache_read_input_token_cost_above_272k_tokens_priority": 1,
"cache_read_input_token_cost_flex_above_272k_tokens": 1,
"cache_read_input_token_cost_above_272k_tokens_ultrafast": 1,
"cache_creation_input_token_cost_above_272k_tokens": 1,
"cache_creation_input_token_cost_flex": 1,
"cache_creation_input_token_cost_flex_above_272k_tokens": 1,
"cache_creation_input_token_cost_priority": 1,
"cache_creation_input_token_cost_above_272k_tokens_priority": 1,
"cache_creation_input_token_cost_ultrafast": 1,
"cache_creation_input_token_cost_above_272k_tokens_ultrafast": 1,
"cache_creation_input_token_cost_fast": 1,
"cache_creation_input_token_cost_above_1hr_fast": 1,
"cache_read_input_token_cost_fast": 1,
"input_cost_per_image": 1,
"input_cost_per_pixel": 1,
"output_cost_per_image": 1,
"output_cost_per_pixel": 1,
"output_cost_per_image_premium_image": 1,
"output_cost_per_image_above_512_and_512_pixels": 1,
"output_cost_per_image_above_512_and_512_pixels_and_premium_image": 1,
"output_cost_per_image_above_1024_and_1024_pixels": 1,
"output_cost_per_image_above_1024_and_1024_pixels_and_premium_image": 1,
"output_cost_per_image_above_1024_and_1536_pixels": 1,
"output_cost_per_image_above_1536_and_1024_pixels": 1,
"output_cost_per_image_above_2048_and_2048_pixels": 1,
"output_cost_per_image_above_4096_and_4096_pixels": 1,
"output_cost_per_image_above_4_megapixels": 1,
"output_cost_per_image_above_8_megapixels": 1,
"output_cost_per_image_above_16_megapixels": 1,
"output_cost_per_image_above_32_megapixels": 1,
"output_cost_per_image_above_64_megapixels": 1,
"output_cost_per_image_low_quality": 1,
"output_cost_per_image_medium_quality": 1,
"output_cost_per_image_high_quality": 1,
"output_cost_per_image_auto_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_low_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_low_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_low_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_medium_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_medium_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_medium_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_high_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_high_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_high_quality": 1,
"output_cost_per_image_above_1024_and_1024_pixels_standard_quality": 1,
"output_cost_per_image_above_1024_and_1536_pixels_standard_quality": 1,
"output_cost_per_image_above_1536_and_1024_pixels_standard_quality": 1,
"input_cost_per_image_token": 1,
"output_cost_per_image_token": 1,
"input_cost_per_audio_token": 1,
"input_cost_per_audio_per_second": 1,
"input_cost_per_second": 1,
"input_cost_per_video_per_second": 1,
"output_cost_per_audio_token": 1,
"output_cost_per_video_per_second": 1,
"output_cost_per_second": 1,
"input_cost_per_token_voice_live": 1,
"output_cost_per_token_voice_live": 1,
"cache_read_input_token_cost_voice_live": 1,
"input_cost_per_audio_token_voice_live": 1,
"output_cost_per_audio_token_voice_live": 1,
"input_cost_per_standard_speech_audio_token_voice_live": 1,
"output_cost_per_standard_speech_audio_token_voice_live": 1,
"input_cost_per_custom_speech_audio_token_voice_live": 1,
"output_cost_per_custom_speech_audio_token_voice_live": 1,
"output_cost_per_video_per_second_480p": 1,
"output_cost_per_video_per_second_720p": 1,
"output_cost_per_video_per_second_1024p": 1,
"output_cost_per_video_per_second_1080p": 1,
"output_cost_per_video_per_second_4k": 1,
"output_cost_per_video_token": 1,
"web_search_cost_per_request": 1,
"input_cost_per_query": 1,
"code_interpreter_cost_per_session": 1,
"inference_geo_us_multiplier": 1,
"cost_per_request": 1,
"ocr_cost_per_page": 1,
"annotation_cost_per_page": 1,
"off_peak_cost_multiplier": 0,
"peak_hours": {
"windows": [
{
"days": [
1,
2,
3,
4,
5
],
"start": "01:00",
"end": "04:00"
}
],
"timezone": "UTC"
}
},
"config_hash": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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": {
"routing_info": {
"provider": "anthropic",
"model": "<string>",
"key": "<string>",
"resolved_key_alias": {
"model_id": "<string>",
"model_name": "<string>",
"model_family": "<string>"
},
"is_fallback": true,
"primary_provider": "anthropic",
"primary_model": "<string>",
"requested_provider": "anthropic",
"requested_model": "<string>",
"server_side_fallback_model": "<string>"
},
"provider": "anthropic",
"original_model_requested": "<string>",
"resolved_model_used": "<string>",
"request_type": "<string>",
"mcp_request_type": "<string>",
"a2a_request_type": "<string>",
"a2a_agent_name": "<string>",
"error_type": "<string>",
"retry_after_ms": 150500,
"raw_request": "<unknown>",
"raw_response": "<unknown>",
"converted_request_type": "<string>",
"dropped_compat_plugin_params": [
"<string>"
],
"latency": 123,
"key_statuses": [
{
"key_id": "<string>",
"status": "success",
"provider": "anthropic",
"error": "<unknown>"
}
],
"mcp_auth_required": {
"kind": "<string>",
"mcp_client_id": "<string>",
"mcp_client_name": "<string>",
"message": "<string>",
"authorize_url": "<string>",
"session_id": "<string>",
"subject_token_missing": true,
"exchange_error": "<string>"
},
"billed_usage": {
"prompt_tokens": 123,
"prompt_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123,
"cached_read_tokens": 123,
"cached_write_tokens": 123
},
"completion_tokens": 123,
"completion_tokens_details": {
"text_tokens": 123,
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123,
"image_tokens": 123,
"rejected_prediction_tokens": 123
},
"total_tokens": 123,
"tool_usage": {
"web_search": {
"num_requests": 123
}
},
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"reasoning_tokens_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123,
"request_cost": 123,
"total_cost": 123
}
}
}
}{
"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": {
"routing_info": {
"provider": "anthropic",
"model": "<string>",
"key": "<string>",
"resolved_key_alias": {
"model_id": "<string>",
"model_name": "<string>",
"model_family": "<string>"
},
"is_fallback": true,
"primary_provider": "anthropic",
"primary_model": "<string>",
"requested_provider": "anthropic",
"requested_model": "<string>",
"server_side_fallback_model": "<string>"
},
"provider": "anthropic",
"original_model_requested": "<string>",
"resolved_model_used": "<string>",
"request_type": "<string>",
"mcp_request_type": "<string>",
"a2a_request_type": "<string>",
"a2a_agent_name": "<string>",
"error_type": "<string>",
"retry_after_ms": 150500,
"raw_request": "<unknown>",
"raw_response": "<unknown>",
"converted_request_type": "<string>",
"dropped_compat_plugin_params": [
"<string>"
],
"latency": 123,
"key_statuses": [
{
"key_id": "<string>",
"status": "success",
"provider": "anthropic",
"error": "<unknown>"
}
],
"mcp_auth_required": {
"kind": "<string>",
"mcp_client_id": "<string>",
"mcp_client_name": "<string>",
"message": "<string>",
"authorize_url": "<string>",
"session_id": "<string>",
"subject_token_missing": true,
"exchange_error": "<string>"
},
"billed_usage": {
"prompt_tokens": 123,
"prompt_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123,
"cached_read_tokens": 123,
"cached_write_tokens": 123
},
"completion_tokens": 123,
"completion_tokens_details": {
"text_tokens": 123,
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123,
"image_tokens": 123,
"rejected_prediction_tokens": 123
},
"total_tokens": 123,
"tool_usage": {
"web_search": {
"num_requests": 123
}
},
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"reasoning_tokens_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123,
"request_cost": 123,
"total_cost": 123
}
}
}
}{
"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": {
"routing_info": {
"provider": "anthropic",
"model": "<string>",
"key": "<string>",
"resolved_key_alias": {
"model_id": "<string>",
"model_name": "<string>",
"model_family": "<string>"
},
"is_fallback": true,
"primary_provider": "anthropic",
"primary_model": "<string>",
"requested_provider": "anthropic",
"requested_model": "<string>",
"server_side_fallback_model": "<string>"
},
"provider": "anthropic",
"original_model_requested": "<string>",
"resolved_model_used": "<string>",
"request_type": "<string>",
"mcp_request_type": "<string>",
"a2a_request_type": "<string>",
"a2a_agent_name": "<string>",
"error_type": "<string>",
"retry_after_ms": 150500,
"raw_request": "<unknown>",
"raw_response": "<unknown>",
"converted_request_type": "<string>",
"dropped_compat_plugin_params": [
"<string>"
],
"latency": 123,
"key_statuses": [
{
"key_id": "<string>",
"status": "success",
"provider": "anthropic",
"error": "<unknown>"
}
],
"mcp_auth_required": {
"kind": "<string>",
"mcp_client_id": "<string>",
"mcp_client_name": "<string>",
"message": "<string>",
"authorize_url": "<string>",
"session_id": "<string>",
"subject_token_missing": true,
"exchange_error": "<string>"
},
"billed_usage": {
"prompt_tokens": 123,
"prompt_tokens_details": {
"text_tokens": 123,
"audio_tokens": 123,
"image_tokens": 123,
"cached_read_tokens": 123,
"cached_write_tokens": 123
},
"completion_tokens": 123,
"completion_tokens_details": {
"text_tokens": 123,
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123,
"image_tokens": 123,
"rejected_prediction_tokens": 123
},
"total_tokens": 123,
"tool_usage": {
"web_search": {
"num_requests": 123
}
},
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"reasoning_tokens_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123,
"request_cost": 123,
"total_cost": 123
}
}
}
}| Permission | Granted via |
|---|---|
Governance:Update | 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.
OSS setup lock. On Bifrost OSS, while dashboard auth is not active (no admin account,
or auth disabled), every management endpoint except the public ones (/health,
/api/version, /api/session/is-auth-enabled, /api/session/login, ...) requires the
operator's setup token in the X-Bifrost-Setup-Token header, in place of Authorization.
The token is set with setup_token in config.json or the BIFROST_SETUP_TOKEN
environment variable. A missing header returns 401, a wrong token 403. The header
stops working once dashboard auth is enabled. The dashboard instead trades the token once
for an HttpOnly bifrost_setup_session cookie via POST /api/session/setup.
See Required permissions for how
permissions are derived and which endpoints are exempt.
Path Parameters
Pricing override ID
Body
Request body for updating a pricing override. All fields are optional - omitted fields are merged from the existing record. The patch field is always replaced in full when provided.
Human-readable label
Scope that determines which requests a pricing override applies to. The virtual_key* family is checked before the user* family during cost resolution, which is checked before the provider/global scopes; within a family, more identifiers present means a more specific match.
global, provider, provider_key, virtual_key, virtual_key_provider, virtual_key_provider_key, user, user_provider, user_provider_key Required for user* scopes
Required for virtual_key* scopes
Required for provider, virtual_key_provider, and user_provider scopes
Required for provider_key, virtual_key_provider_key, and user_provider_key scopes
exact, wildcard Model name or wildcard prefix ending with * (e.g. "claude-3*")
Request types this override applies to.
1Request type for pricing override filtering. Stream variants are treated identically to their base type - specifying chat_completion covers both streaming and non-streaming chat requests.
chat_completion, text_completion, responses, embedding, rerank, speech, transcription, image_generation, image_variation, image_edit, video_generation, video_remix Pricing fields to override. All non-null fields are applied. Usage-based values are costs per unit in USD. cost_per_request is a flat fee in USD applied once per billed request.
Show child attributes
Show child attributes
Was this page helpful?

