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

# Change backend of the Model Server



## OpenAPI

````yaml /openapi/v4.yaml put /v4/serving/{model_server_id}/backend
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/serving/{model_server_id}/backend:
    put:
      tags:
        - Model server
      summary: Change backend of the Model Server
      operationId: PUT-V4-/v4/serving/{model_server_id}/backend
      parameters:
        - name: model_server_id
          in: path
          required: true
          schema:
            type: string
            title: Model Server Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeBackendRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeBackendResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ChangeBackendRequest:
      properties:
        new_model_deployment_id:
          type: string
          title: New Model Deployment Id
      type: object
      required:
        - new_model_deployment_id
      title: ChangeBackendRequest
    ChangeBackendResponse:
      properties:
        name:
          type: string
          title: Name
        model_server_id:
          type: string
          title: Model Server Id
        model_deployment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Deployment Id
        account_id:
          type: string
          title: Account Id
        alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Alias
        new_model_deployment_id:
          type: string
          title: New Model Deployment Id
        old_model_deployment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Old Model Deployment Id
      type: object
      required:
        - name
        - model_server_id
        - account_id
        - new_model_deployment_id
      title: ChangeBackendResponse
      description: |-
        Point the model server to a new model deployment.

        Args:
            old_model_deployment_id(str): The ID of the model deployment to use as the new backend.
    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
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````