Inference Providers

Create a Smart Router

Changed on

Creates a Smart Router: its name and its AI Gateway models in order, each with the tasks it handles (at least one). It applies to nobody until who it applies to is set with PUT /v1/org/auto-routers/{routerId}/assignment. Tasks are shared across the organization and matched case-insensitively; new names are created. The first model wins ties and is used when the router cannot decide. Refused with auto_router_not_configured while the AI Gateway has no TypeSafe key. Requires the Manage Gateway providers permission and a recent sign-in. Returns the whole list and the new router's id.

post/v1/org/auto-routers

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Request body

AutoRouterWrite required
name, string required
models, AutoRouterModelWrite[] required

Response

Smart Router created.

AutoRouterSaved required
routing, 'ready' | 'missing_key' | 'unknown' required
canEdit, boolean required
routers, AutoRouter[] required
tasks, string[] required
routerId, string required

Changes