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.

Response

The created policy.
idstringformat: "uuid"
namestring
descriptionstring
strategyenum
allowed_providerslist of strings
allowed_modelslist of strings
priority_orderlist of objects
created_atdatetime
modified_atdatetime

Errors

422
Unprocessable Entity Error