---
title: "Save the Auto Router"
method: PUT
path: "/v1/org/auto-router"
tags: ["Inference Providers"]
---

# Save the Auto Router

`PUT /v1/org/auto-router`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/org/auto-router`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Replaces the organization's Auto Router: whether it is enabled and its routes in order. Each route names an AI Gateway model from the options list, a description of when to use it, and one thinking level the model allows. The first route is the default model: its prompt is fixed (any prompt sent for it is ignored), Auto uses it when no other route matches, and it is the fallback when the router cannot decide. Every other route needs a prompt; enabling needs at least one route and is refused with auto_router_not_configured while the AI Gateway has no TypeSafe key. Requires the Manage Gateway providers permission, a recent sign-in and the Auto Router feature.

## Request body

- AutoRouterWrite
  - `enabled` boolean, required
  - `routes` AutoRouterRouteWrite[], required
    - `providerId` string, required
    - `modelId` string, required
    - `prompt` string
    - `thinkingLevel` 'default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max', required

## Response `200`

Auto Router saved.

- AutoRouterSettings
  - `enabled` boolean, required
  - `routing` 'ready' | 'missing_key' | 'unknown', required
  - `routes` AutoRouterRoute[], required
    - `id` string, required
    - `providerId` string, required
    - `modelId` string, required
    - `prompt` string, required
    - `thinkingLevel` 'default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max', required
    - `isDefault` boolean, required
  - `canEdit` boolean, required

## Other responses

- `400`: The request is invalid (for example a route other than the first has no prompt), a route names a model the AI Gateway does not offer, or a thinking level the model does not allow.
- `401`: Authentication required.
- `403`: The caller lacks the Manage Gateway providers permission or needs to sign in again.
- `404`: The organization was not found, or the Auto Router feature is off.
- `409`: Enabling was refused because the AI Gateway has no routing (TypeSafe) key.

## Changes

- **2026-10-27** `9fa47a73a88e`: 2 breaking, 1 warning, 4 info
  - added the new required request property `routes/items/thinkingLevel`
  - removed the required property `routes/items/thinkingLevels` from the response with the `200` status
  - removed the request property `routes/items/thinkingLevels`
  - the request property `routes/items/prompt` became optional
  - …3 more
- **2026-10-27** `cc371ee3c4ff`: 2 info
  - added the non-success response with the status `409`
  - added the required property `routing` to the response with the `200` status
- **2026-10-27** `7e95da81abe4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/org/auto-router/put.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/8117bc7c5626?raw)
