---
title: "Replace AI Model"
method: PUT
path: "/v1/ai-models/{aiModelId}"
tags: ["Catalog AI Models"]
---

# Replace AI Model

`PUT /v1/ai-models/{aiModelId}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-models/{aiModelId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Replaces an AI Model.

## Path parameters

- `aiModelId` string, uuid, required

## Request body

- AiModelReplace: Request body for creating or replacing an AI Model.
  - `name` string, required: The machine name of the AI Model that uniquely identifies it within the catalog.
  - `display_name` string, required: The display name of the AI Model.
  - `description` string, nullable: Optionally provide a description of the AI Model.
  - `labels` Labels: Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

## Response `200`

The replaced AI Model

- AiModel: An AI Model catalog resource.
  - `id` string, uuid, required: The unique identifier of the AI Model.
  - `name` string, required: The machine name of the AI Model that uniquely identifies it within the catalog.
  - `display_name` string, required: The display name of the AI Model.
  - `description` string, nullable, required: A description of the AI Model.
  - `labels` Labels, required: Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
  - `managed_by` ManagedBy, required: Stores information about what manages this entity, such as the tool or system responsible for its lifecycle (for example, `terraform`). Keys must be 1–63 characters long, start and end with an alphanumeric character, and may contain dashes (`-`), underscores (`_`), and dots (`.`). Values must be 1–127 characters long and must not be empty. Keys and values must not contain spaces or control characters.
  - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
  - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict

## Changes

- **2026-11-12** `d8bd04cfbaf7`: 1 breaking, 1 info
  - the `managed_by/additionalProperties/` response property's maxLength was increased from `63` to `127` for the response status `200`
  - the `managed_by/additionalProperties/` response's property pattern was changed from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$` for the status `200`
- **2026-10-15** `7aab863a6daa`: 1 breaking, 2 warning
  - added `#/components/schemas/InvalidParameterMinimumTime, #/components/schemas/InvalidParameterMaximumTime` to the `invalid_parameters/items/` response property `oneOf` list for the response status `400`
  - added the new `key_invalid` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
  - added the new `unique` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
- **2026-10-07** `59663dd13a10`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v1/ai-models/:aiModelId/put.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
