Create a routing policy

Create an org routing policy. The first policy becomes the org default automatically. Requires the manage_routing scope.

Authentication

AuthorizationBearer

A management key (prefixed mgmt_), created in the dashboard under Settings, API keys, Management keys. Distinct from a regular gateway API key, and never used to call models.

Request

This endpoint expects an object.
namestringRequired<=255 characters
strategyenumRequired
descriptionstringOptional
is_defaultbooleanOptional

Make this the org default (unsets the previous default).

allowed_providerslist of stringsOptional

INTELLIGENT only, optional. If provided, must match the providers of allowed_models (it does not filter independently); returned derived from allowed_models on reads.

allowed_modelslist of stringsOptional
INTELLIGENT only.
priority_orderlist of objectsOptional
PRIORITY only.
axisenumOptional

INTELLIGENT only. Optimization axis the router optimizes for; defaults to COST.

Response

The created policy.
idstringOptionalformat: "uuid"
namestringOptional
descriptionstringOptional
strategyenumOptional
allowed_providerslist of stringsOptional
allowed_modelslist of stringsOptional
priority_orderlist of objectsOptional
axisenumOptional

Optimization axis the router optimizes for (INTELLIGENT only, else null); one of COST, PERFORMANCE, CAPABILITY.

created_atdatetimeOptional
modified_atdatetimeOptional

Errors

422
Unprocessable Entity Error