> ## Documentation Index
> Fetch the complete documentation index at: https://docs.electronhub.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Router Settings

> Merge-patch the settings. Send only the fields to change.



## OpenAPI

````yaml PATCH /router/settings
openapi: 3.0.1
info:
  title: Electron Hub API
  description: >-
    Unified API platform integrating 200+ AI models for chat, image generation,
    speech-to-text, embeddings, and more.
  version: 1.0.0
  contact:
    name: Electron Hub Support
    email: support@electronhub.ai
    url: https://discord.com/invite/electronhub
  license:
    name: MIT
servers:
  - url: https://api.electronhub.ai/v1
    description: Production API v1
security:
  - bearerAuth: []
paths:
  /router/settings:
    patch:
      tags:
        - Router
      summary: Update Router settings
      description: Merge-patch the settings. Send only the fields to change.
      operationId: updateRouterSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/RouterSettings'
              properties:
                expected_version:
                  type: integer
            example:
              defaultPolicyId: work
              lockOverrides: false
              expected_version: 0
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  settings:
                    $ref: '#/components/schemas/RouterSettings'
                  version:
                    type: integer
              example:
                settings:
                  steerManualPicks: false
                  scope:
                    - chat
                    - agents
                  applyMode: silent
                  defaultPolicyId: default
                  lockOverrides: false
                  classifier: auto
                  shadowPercent: 0
                  activitySampleApi: 100
                version: 1
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: Body must be an object.
                  type: invalid_request_error
                  param: null
                  code: 400
        '403':
          description: Proxy keys cannot manage Router settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: Only master keys can manage Router settings.
                  type: error
                  param: null
                  code: 403
        '409':
          description: Version conflict. `current` holds the stored document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: Version conflict
                  type: router_conflict
                  param: null
                  code: 409
                current:
                  policy:
                    policyId: work
                    name: Work
                    schemaVersion: 4
                    mode: auto
                    auto:
                      costTier: high
                      qualityFloor: 0
                      preferFast: false
                      preferVendor: null
                      preferStrength: 0
                      maxTtft: 0
                      perCategory: {}
                    custom:
                      rules: []
                      default:
                        - action: useAuto
                    models:
                      allowed: []
                      excluded:
                        - '*:free'
                      strictAllowed: false
                    guardrails:
                      maxCostPerReq: null
                      blockOverCost: false
                      budgetUsd: 5
                      budgetWindow: daily
                      budgetScope: routed
                      blockOverBudget: false
                      pii:
                        enabled: false
                        action: block
                        model: null
                        entities: {}
                        labels: {}
                        custom: []
                        scanAll: false
                    cache:
                      enabled: false
                      ttlMin: 1440
                      maxEntries: 100
                      semantic: false
                      semanticThreshold: 0.9
                  version: 4
                  updatedAt: '2026-11-08T07:34:14.937184Z'
                  updatedBy: client
        '429':
          description: More than 60 Router writes in a minute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: Too many Router changes. Retry in a minute.
                  type: rate_limit_exceeded
                  param: null
                  code: 429
components:
  schemas:
    RouterSettings:
      type: object
      properties:
        defaultPolicyId:
          type: string
          description: 'Policy used by `model: "auto"`.'
        lockOverrides:
          type: boolean
          description: Ignore request `router` fields except `metadata`.
        classifier:
          type: string
          enum:
            - auto
            - rules
          description: '`rules` skips the routing model and its fee.'
        shadowPercent:
          type: number
          minimum: 0
          maximum: 100
          description: >-
            Share of requests that also record a comparison against a baseline
            pick.
        activitySampleApi:
          type: number
          minimum: 0
          maximum: 100
          description: Share of API requests stored in the decision log.
        steerManualPicks:
          type: boolean
          description: 'Electron Hub app: route manual model picks.'
        scope:
          type: array
          items:
            type: string
            enum:
              - chat
              - agents
          description: Electron Hub app surfaces where steering applies.
        applyMode:
          type: string
          enum:
            - silent
            - preview
          description: 'Electron Hub app: apply picks directly or preview them first.'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your API key (starts with 'ek-')

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.