> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update model

> Update an existing model. See [Models](https://docs.galtea.ai/concepts/model).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json patch /models/{id}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /models/{id}:
    patch:
      tags:
        - models
      summary: Update model
      description: >-
        Update an existing model. See
        [Models](https://docs.galtea.ai/concepts/model).
      operationId: updateModel
      parameters:
        - name: id
          in: path
          description: Model ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Model'
      responses:
        '200':
          description: Model updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Model:
      type: object
      properties:
        id:
          type: string
          example: model_123
        organizationId:
          type: string
          nullable: true
          example: org_123
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: GPT-4
        inputCostPerToken:
          type: number
          nullable: true
          example: 0.00001
        outputCostPerToken:
          type: number
          nullable: true
          example: 0.00003
        cacheReadInputTokenCost:
          type: number
          nullable: true
          example: 0.000005
        cacheCreationInputTokenCost:
          type: number
          nullable: true
          example: 0.000015
        inputCostPerTokenAbove128kTokens:
          type: number
          nullable: true
          example: 0.00002
        outputCostPerTokenAbove128kTokens:
          type: number
          nullable: true
          example: 0.00006
        tokenizerProvider:
          type: string
          nullable: true
          example: OPENAI
        source:
          type: string
          enum:
            - PREDEFINED
            - CUSTOM
          nullable: true
          example: PREDEFINED
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````