---
title: "Update auto-routing settings"
method: PATCH
path: "/routing/auto"
tags: ["Gateway"]
---

# Update auto-routing settings

`PATCH /routing/auto`

## Request

- Base URL: `https://api.phaseo.app/v1`
- URL: `https://api.phaseo.app/v1/routing/auto`
- Auth: HTTP bearer

Changes the fields sent; the result is validated as a whole, as the dashboard saves it. A custom spend_profile needs both price limits. Owners and admins; settings:write required.

## Request body

- AutoRoutingSettingsUpdateRequest
  - `allowed_patterns` string[]
  - `spend_profile` 'economy' | 'standard' | 'premium' | 'unrestricted' | 'custom'
  - `max_input_price_per_million` number, nullable
  - `max_output_price_per_million` number, nullable
  - `objective` 'balanced' | 'quality' | 'cost' | 'latency'
  - `allow_fallbacks` boolean

## Response `200`

Updated auto-routing settings

- AutoRoutingSettingsResponse
  - `data` AutoRoutingSettings, required
    - `allowed_patterns` string[]: Provider/model patterns the auto-router may choose from, such as openai/*. Empty allows every model.
    - `spend_profile` 'economy' | 'standard' | 'premium' | 'unrestricted' | 'custom'
    - `max_input_price_per_million` number, nullable: USD per million input tokens; set only for the custom spend profile.
    - `max_output_price_per_million` number, nullable: USD per million output tokens; set only for the custom spend profile.
    - `objective` 'balanced' | 'quality' | 'cost' | 'latency'
    - `allow_fallbacks` boolean
    - `revision` string, nullable
    - `updated_at` string, date-time, nullable

## Other responses

- `400`: Invalid settings
- `401`: Unauthorized

## Changes

- **2026-10-28** `72ba9c856a2c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/changes/routing/auto/patch.md)

---

[API](https://skmtc.dev/phaseo/apis/phaseo-gateway-api.md) - [All operations](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/revisions/5ca9bb220d25?raw)
