---
title: "Update AI Gateway Settings"
method: PUT
path: "/apiops/settings/ai-gateway"
tags: ["AiGatewaySetting"]
---

# Update AI Gateway Settings

`PUT /apiops/settings/ai-gateway`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/settings/ai-gateway`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/settings/ai-gateway/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates the global AI Gateway settings (singleton document, system-admin only). Only non-null fields in the request body are applied — existing values are preserved for omitted fields.

## Request body

- AiGatewaySettingDTO
  - `defaultConnectTimeoutSeconds` integer
  - `defaultStreamTimeoutSeconds` integer
  - `defaultRetryCount` integer
  - `maxAiRequestBodyBytes` integer
  - `maxAiBinaryRequestBodyBytes` integer
  - `maxAiBinaryResponseBodyBytes` integer
  - `maxToolTurns` integer
  - `defaultConnectionPoolSize` integer
  - `defaultIdleConnectionTimeoutSeconds` integer

## Response `200`

successful operation!

- ApiOpsResponseAiGatewaySetting
  - `status` 'SUCCESS' | 'FAILURE'
  - `resultMessage` string
  - `resultList` AiGatewaySettingDTO[]
    - `defaultConnectTimeoutSeconds` integer
    - `defaultStreamTimeoutSeconds` integer
    - `defaultRetryCount` integer
    - `maxAiRequestBodyBytes` integer
    - `maxAiBinaryRequestBodyBytes` integer
    - `maxAiBinaryResponseBodyBytes` integer
    - `maxToolTurns` integer
    - `defaultConnectionPoolSize` integer
    - `defaultIdleConnectionTimeoutSeconds` integer
  - `resultCount` integer

## Other responses

- `400`: bad request!
- `401`: not authorized for this operation!
- `500`: internal error!

## Changes

- **2026-10-20** `d1a546deccf0`: 9 breaking
  - the `defaultConnectTimeoutSeconds` request property format changed from no format to `int32`
  - the `defaultConnectionPoolSize` request property format changed from no format to `int32`
  - the `defaultIdleConnectionTimeoutSeconds` request property format changed from no format to `int32`
  - the `defaultRetryCount` request property format changed from no format to `int32`
  - …5 more
  - …this revision’s changelog is incomplete
- **2026-10-16** `68680081f7b0`: 24 info
  - added the new optional request property `defaultAnonymousBudget/allOf[#/components/schemas/AiTokenBudgetDTO]/requestsPerDay`
  - added the new optional request property `defaultAnonymousBudget/allOf[#/components/schemas/AiTokenBudgetDTO]/requestsPerHour`
  - added the new optional request property `defaultAnonymousBudget/allOf[#/components/schemas/AiTokenBudgetDTO]/requestsPerMinute`
  - added the new optional request property `defaultAnonymousBudget/allOf[#/components/schemas/AiTokenBudgetDTO]/requestsPerMonth`
  - …20 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/apinizer/apis/apinizer-management-apis/changes/apiops/settings/ai-gateway/put.md)

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
