---
title: "update llm_gateway_configuration"
method: PATCH
path: "/llm_gateway_configurations/{id}"
tags: ["LlmGatewayConfigurations"]
---

# update llm_gateway_configuration

`PATCH /llm_gateway_configurations/{id}`

## Request

- Base URL: `https://api.aptible.com`
- URL: `https://api.aptible.com/llm_gateway_configurations/{id}`
- Auth: API key in header `Authorization`

Partially updates an LLM Gateway configuration's attributes.

## Path parameters

- `id` integer, required

## Query parameters

- `no_embed` boolean

## Headers

- `Prefer` 'no_sensitive_extras=true'

## Request body

- UpdateLlmGatewayConfigurationRequest
  - `spend_limit` number: New monthly spend limit in USD. Lowering it also lowers the spend_limit of any of the organization's keys that are above the new limit, to match.
  - `models` string[]: List of permitted model identifiers

## Response `200`

successful

- LlmGatewayConfiguration
  - `id` integer, required: Database ID of the LLM Gateway Configuration
  - `_type` string, required
  - `organization_id` string, required: The organization this configuration belongs to
  - `team_id` string, required: The LiteLLM team ID for this organization
  - `trial` boolean, required: Whether the organization is on a trial AI Gateway plan
  - `spend_limit` string, required: Monthly spend limit in USD (decimal, serialized as string)
  - `models` string[], required: List of permitted model identifiers
  - `created_at` string, dateTime, required
  - `updated_at` string, dateTime, required
  - `_links` LlmGatewayConfigurationLinks
    - `self` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri

## Other responses

- `422`: spend_limit cannot be updated on a trial configuration
- `default`: Error response. Often a 4xx or 5xx status code

## Changes

- **2026-10-20** `ba72edfe0324`: 1 info
  - added the new optional request property `models`
- **2026-07-24** `1dc1e5b8c6eb`: 2 info
  - added the new optional `header` request parameter `Prefer`
  - added the new optional `query` request parameter `no_embed`
- **2026-07-15** `5c71f4c63067`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aptible/apis/aptible-api-v1/changes/llm_gateway_configurations/:id/patch.md)

---

[API](https://skmtc.dev/aptible/apis/aptible-api-v1.md) - [All operations](https://skmtc.dev/aptible/apis/aptible-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/aptible/apis/aptible-api-v1/revisions/a21f6b1bc6fe?raw)
