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

# Update Model

> Update a model's settings.

You can update the following settings:
- serving_active
- serving_priority



## OpenAPI

````yaml put /platform/v2/models/{model_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /platform/v2/models/{model_id}:
    put:
      tags:
        - Model
      summary: Update Model
      description: |-
        Update a model's settings.

        You can update the following settings:
        - serving_active
        - serving_priority
      operationId: update_model_platform_v2_models__model_id__put
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelUpdateOptions'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ModelUpdateOptions:
      properties:
        settings:
          $ref: '#/components/schemas/ModelUpdateSettings'
        priority_conflict_resolution:
          type: string
          enum:
            - strict
            - auto_increment
            - swap
          title: Priority Conflict Resolution
          description: >-
            How to resolve a priority collision when `settings.serving_priority`
            is already taken by another model at the same site:

            - `strict`: reject the update with a 409 error.

            - `auto_increment`: shift all conflicting models' priorities by
            incrementing by 1.

            - `swap`: swap the priorities of the target model and the
            conflicting model.
          default: strict
      type: object
      required:
        - settings
      title: ModelUpdateOptions
    ValidationResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorItem'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ValidationResponse
    ModelUpdateSettings:
      properties:
        serving_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Serving Active
          description: >-
            Whether the model is active for serving forecasts. Leave unset to
            keep the current value.
        serving_priority:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Serving Priority
          description: >-
            Serving priority of the model within its site. 1 is the highest
            priority. Must be unique per site — see
            `priority_conflict_resolution` for how conflicts are handled. Leave
            unset to keep the current value.
      type: object
      title: ModelUpdateSettings
    ErrorItem:
      properties:
        field:
          type: string
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - field
        - message
      title: ErrorItem
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Your API key. This is required to access our API programatically. You
        can view your API key in the Rebase dashboard.
      in: header
      name: Authorization

````