v1

latestOpenAPI 3.0.22026-08-062794201004.1 KB
Models (AI Data Plane)

Update Model

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.

put/v4/organizations/{organizationId}/aiServices/models/{modelId}

Headers

If-Matchstring
Example:12

A precondition header that specifies the entity tag of a resource.

Request body

namestring

Name of the model.

enableBatchingboolean

Option to enable batching.

keywordFilteringstring[]

Keywords in a comma-separated string to filter the input.

guardrailsstring[]

List of guardrail categories as plain text strings. These will be formatted into a template and base64-encoded internally.

Example request

{
  "name": "my-new-model",
  "caching": {
    "enableStandard": true,
    "semantic": {
      "embeddingModel": "my-embedding-model-id",
      "scoreThreshold": 0.75,
      "dimensions": 4096,
      "distanceMetric": "dot_product"
    },
    "defaultCache": "semantic",
    "expiryTTL": 1000
  },
  "enableBatching": true,
  "keywordFiltering": [
    "harassment",
    "murder"
  ],
  "guardrails": [
    "sexual crime",
    "hate speech"
  ],
  "jailbreak": {
    "scoreThreshold": 0.9
  }
}

Response

Successfully submitted request to update model.