v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
router

Route

Score one request against the chosen router (POC, feature-flagged).

Args: request: The routing request (router_type + messages/prompt + knobs). auth: The authenticated caller; its team scopes the release flag.

Returns: The router's decision, or a conservative fallback route on upstream failure (the endpoint never 5xxs on a routing error).

Raises: HTTPException: 404 when router_type is unknown or not released to the caller's team (keeps the surface invisible to non-POC teams and reveals nothing about which routers exist).

post/v1/route

Request body

router_typestring required
messagesobject[] nullable
promptstring nullable
thresholdnumber nullable
max_regretnumber nullable
alphanumber nullable
lambda_costnumber nullable
allowed_modelsstring[] nullable
actual_modelstring nullable

Response

Successful Response

modelstring nullable
confidencenumber nullable
expected_cost_usdnumber nullable
rulestring nullable
reason_codesstring[]
policy_versionstring nullable
candidatesobject[]