Skip to main content
PUT
/
api
/
governance
/
routing-rules
/
{rule_id}
Error
A valid request URL is required to generate request examples
{
  "message": "<string>",
  "rule": {
    "scope": "global",
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "enabled": true,
    "cel_expression": "<string>",
    "targets": [
      {
        "weight": 0.5,
        "provider": "<string>",
        "model": "<string>",
        "key_id": "<string>"
      }
    ],
    "fallbacks": [
      "<string>"
    ],
    "scope_id": "<string>",
    "priority": 123,
    "query": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

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

rule_id
string
required

Routing rule ID

Body

application/json

Request to update a routing rule (all fields optional; providing targets replaces all existing targets)

name
string
description
string
enabled
boolean
cel_expression
string
targets
object[]

Replaces all existing targets when provided; weights must sum to 1

Minimum array length: 1
fallbacks
string[]
priority
integer
query
object

Response

Routing rule updated successfully

Response containing created/updated routing rule

message
string
rule
object

CEL-based routing rule for intelligent request routing