---
updatedAt: 2026-10-25T15:46:36.000Z
agentTools:
  projectIndex: https://docs.superwise.ai/llms.txt
---

# Update Model

Update a Model by id

- **model_id** (str): Required. The id of the model to be updated.
- **payload** (ModelUpdate): Required. The payload that includes:
    - **name** (str): Name of the model, min_length=1, max_length=100.
    - **description** (str or None): A description about the model.

Updates a model's name or description and returns the updated model.

## When to use it

Use it to rename a model or change its description.

## Required parameters

* `model_id` (path): the ID of the model.

Optional body fields: `id`, `name`, `description`.

## Response

A successful call returns `200 OK` with the `ModelResponse` object: `id`, `name`, `description`, `created_by`, and timestamps.

**Related:** [Get a model](https://docs.superwise.ai/reference/get_model_by_id), [Delete a model](https://docs.superwise.ai/reference/delete_model), [Create a model](https://docs.superwise.ai/reference/create_model)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/v1/models/{model_id}": {
      "patch": {
        "tags": [
          "Model"
        ],
        "summary": "Update Model",
        "description": "Update a Model by id\n\n- **model_id** (str): Required. The id of the model to be updated.\n- **payload** (ModelUpdate): Required. The payload that includes:\n    - **name** (str): Name of the model, min_length=1, max_length=100.\n    - **description** (str or None): A description about the model.",
        "operationId": "update_model",
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Model Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "info": {
    "title": "Superwise Main Entities",
    "description": "API reference",
    "version": "0.1.0"
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "ModelResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "_id",
          "name",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "ModelResponse"
      },
      "ModelUpdate": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "title": "ModelUpdate"
      }
    },
    "securitySchemes": {
      "implicit": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://authentication.superwise.ai/identity/resources/auth/v1/api-token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "implicit": []
    }
  ],
  "servers": [
    {
      "url": "api.superwise.ai",
      "description": "Superwise Api Gateway"
    }
  ]
}
```