Skip to main content
PUT
/
api
/
governance
/
pricing-overrides
/
{id}
Error
A valid request URL is required to generate request examples
{
  "message": "<string>",
  "pricing_override": {
    "id": "<string>",
    "name": "<string>",
    "scope_kind": "global",
    "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_character": 1,
      "input_cost_per_token_above_128k_tokens": 1,
      "output_cost_per_token_above_128k_tokens": 1,
      "input_cost_per_token_above_200k_tokens": 1,
      "output_cost_per_token_above_200k_tokens": 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_priority": 1,
      "cache_read_input_image_token_cost": 1,
      "cache_creation_input_audio_token_cost": 1,
      "input_cost_per_image": 1,
      "output_cost_per_image": 1,
      "input_cost_per_pixel": 1,
      "output_cost_per_pixel": 1,
      "input_cost_per_image_token": 1,
      "output_cost_per_image_token": 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_premium_image": 1,
      "output_cost_per_image_above_512_and_512_pixels": 1,
      "output_cost_per_image_above_1024_and_1024_pixels": 1,
      "output_cost_per_image_above_2048_and_2048_pixels": 1,
      "output_cost_per_image_above_4096_and_4096_pixels": 1,
      "input_cost_per_audio_token": 1,
      "output_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_video_per_second": 1,
      "output_cost_per_second": 1,
      "search_context_cost_per_query": 1,
      "code_interpreter_cost_per_session": 1
    },
    "config_hash": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.getbifrost.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your provider API key or Bifrost authentication token. Virtual keys (prefixed with sk-bf-) can also be passed here.

Path Parameters

id
string
required

Pricing override ID

Body

application/json

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.

name
string

Human-readable label

scope_kind
enum<string>
Available options:
global,
provider,
provider_key,
virtual_key,
virtual_key_provider,
virtual_key_provider_key
virtual_key_id
string

Required for virtual_key* scopes

provider_id
string

Required for provider and virtual_key_provider scopes

provider_key_id
string

Required for provider_key and virtual_key_provider_key scopes

match_type
enum<string>
Available options:
exact,
wildcard
pattern
string

Model name or wildcard prefix ending with * (e.g. "claude-3*")

request_types
enum<string>[]

Request types this override applies to.

Minimum array length: 1

Request 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.

Available options:
chat_completion,
text_completion,
responses,
embedding,
rerank,
speech,
transcription,
image_generation,
image_variation,
image_edit,
video_generation,
video_remix
patch
object

Pricing fields to override. Only non-zero/non-null fields are applied. All values are cost per unit in USD.

Response

Pricing override updated successfully

message
string
pricing_override
object

A pricing override that applies custom rates to matching requests.