---
title: "Update Model"
method: PUT
path: "/v4/organizations/{organizationId}/aiServices/models/{modelId}"
tags: ["Models (AI Data Plane)"]
---

# Update Model

`PUT /v4/organizations/{organizationId}/aiServices/models/{modelId}`

## Request

- Base URL: `https://cloudapi.cloud.couchbase.com`
- URL: `https://cloudapi.cloud.couchbase.com/v4/organizations/{organizationId}/aiServices/models/{modelId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/couchbase/apis/couchbase-capella-management-api/docs/v4/organizations/:organizationId/aiServices/models/:modelId/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates an existing model.

Model updates may take up to a few minutes to take effect.

In order to access this endpoint, the provided API key must have at least one of the following roles:
- Organization Owner

To learn more, see [Organization, Project, and Database Access Overview](https://docs.couchbase.com/cloud/organizations/organization-projects-overview.html).

## Headers

- `If-Match` string

## Request body

- UpdateModelRequest: Request body for creating a language model
  - `name` string: Name of the model.
  - `caching` Caching: Caching configuration for the model. Caching improves system efficiency by caching frequently accessed data, both at the conversational level (storing request-specific conversation history) and at the semantic level (saving the embeddings for queries and results), ensuring optimal performance while managing memory costs effectively. Supports multiple caching strategies for improved response times and reduced strain on backend LLM services.
    - `enableStandard` boolean: Enables standard caching using exact match caching with SHA-256 hash of the prompt request/query as the document key. Returns cached response if hash matches, otherwise stores the new response with the SHA-256 hash as the key. Ideal for identical repeated requests.
    - `enableConversational` boolean: Enables conversational caching for maintaining conversation history and context for both standard and semantic caching strategies. This enables contextual session-based caching where conversation context (session topic) is stored along with either standard or semantic cache. Allows searching entire conversations for matches and can return all conversations for a given context/session or only specific matched responses. Essential for maintaining conversation history and context.
    - `semantic` object: Semantic caching configuration that enables similarity-based caching using Couchbase FTS vector search. Creates embeddings for prompt queries, performs vector search with configurable score threshold, and returns cached responses for semantically similar requests. Semantic caching is enabled by the presence of this object.
      - `embeddingModel` string: Specifies the embedding model deployed by the customer to use for generating vector embeddings. This model converts text queries into numerical vectors for semantic similarity matching in the cache.
      - `scoreThreshold` number: The threshold value for semantic similarity matching, should be > 0. Default is 0.75.
      - `dimensions` integer: The vector dimensions for semantic caching.
      - `distanceMetric` string: The vector similarity metric used for semantic matching.
    - `defaultCache` 'standard' | 'semantic': Specifies the primary caching strategy when multiple types are enabled. Choose 'standard' for exact SHA-256 hash matching or 'semantic' for vector similarity-based matching as the default behavior.
    - `expiryTTL` integer: Cache expiry time-to-live (TTL) in seconds. Determines how long cached responses, embeddings, and conversation context remain valid before being automatically removed from the cache store.
  - `enableBatching` boolean: Option to enable batching.
  - `keywordFiltering` string[]: Keywords in a comma-separated string to filter the input.
  - `guardrails` string[]: List of guardrail categories as plain text strings. These will be formatted into a template and base64-encoded internally.
  - `jailbreak` object: Jailbreak model information.
    - `scoreThreshold` number, double: The score threshold for the jailbreak model. Ranges between 0-1; 0<score<1.

## Response `204`

Successfully submitted request to update model.

## Other responses

- `403`: The client does not have the necessary permissions to access this resource.
- `404`: The requested resource was not found.
- `412`: Returned when there is a mismatch with the Etag version.
- `422`: Request validation error.
- `429`: Returned when the client exceeds the rate limit for the given APIKey.
- `500`: An unexpected error occurred in the server while processing this request.

## Changes

- **2026-08-06** `e67df5d1f74e`: 2 info
  - api tag `Models (AI Data Plane)` added
  - api tag `Models (AI Services)` removed

[Operation history](https://skmtc.dev/couchbase/apis/couchbase-capella-management-api/changes/v4/organizations/:organizationId/aiServices/models/:modelId/put.md)

---

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