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

# Create Model

`POST /v4/organizations/{organizationId}/aiServices/models`

Create a new model deployment.

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).

## Request body

- object — Request body for creating a language model
  - `name` string, required — Name of the model.
  - `catalogModelName` string, required — Name of the model deployed from the model catalog.
  - `cloudConfig` CloudConfig, required — The cloud configuration for the model.
    - `provider` 'aws' | 'gcp' | 'azure', required — The cloud service provider where the model will be deployed. Currently only AWS is supported.
    - `region` string, required — Cloud provider region, for example `us-west-2`.
    - `compute` object, required — Type of the compute on which the model is deployed.
      - `cpu` 4 | 32, required — The number of cpu vCPUs. For AWS instances g6.xlarge, g6e.xlarge use 4 vCPUs, and for p3.8xlarge use 32 vCPUs.
      - `gpuMemory` 24 | 48 | 192, required — The memory in GB for the GPU. For AWS instance g6.xlarge use 24 GB GPU Memory, for g6e.xlarge use 48 GB GPU Memory, and for g6e.12xlarge use 192 GB RAM.
  - `quantization` 'fp8' | 'fp16' | 'fullPrecision' — Quantization options for the model. Options include 8-bit, 16bit, and full-precision.
  - `optimization` 'throughput' | 'latency' — Optimization profile option for the model.
  - `dimensions` integer — Dimensions specify the vector dimensions for the underlying embedding model.
  - `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.
  - `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.

## Response `202`

Model queued for deployment successfully.

- CreateLanguageModelResponse — Response for language model creation request.
  - `id` string, uuid — Unique identifier for the created language model.

## Other responses

- `400` — Returned when we are unable to decode the recevied payload.
- `401` — The client does not have the valid credentials to access this resource.
- `403` — The client does not have the necessary permissions to access this resource.
- `404` — The requested resource was not found.
- `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.

---

[API](https://skmtc.net/couchbase/apis/couchbase-capella-management-api.md) · [All operations](https://skmtc.net/couchbase/apis/couchbase-capella-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/couchbase/couchbase-capella-management-api/revisions/27d3c1e98fee/schema)
