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

# Scale Deployment

> Set a running deployment's replica count. Any member of its team, or the owner of a
personal one, may scale it; on-demand scale-ups reserve and bill the added GPUs.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/inference/deployments/{deployment_id}/scale
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/inference/deployments/{deployment_id}/scale:
    post:
      tags:
        - inference
      summary: Scale Deployment
      description: >-
        Set a running deployment's replica count. Any member of its team, or the
        owner of a

        personal one, may scale it; on-demand scale-ups reserve and bill the
        added GPUs.
      operationId: scale_deployment_api_v1_inference_deployments__deployment_id__scale_post
      parameters:
        - name: deployment_id
          in: path
          required: true
          schema:
            type: string
            title: Deployment Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScaleRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceDeployment'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    ScaleRequest:
      properties:
        replicas:
          type: integer
          maximum: 32
          minimum: 1
          title: Replicas
      type: object
      required:
        - replicas
      title: ScaleRequest
    InferenceDeployment:
      properties:
        id:
          type: string
          title: Id
        deploymentName:
          type: string
          title: Deploymentname
        status:
          $ref: '#/components/schemas/JobStatus'
        statusPhase:
          anyOf:
            - type: string
            - type: 'null'
          title: Statusphase
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
        servedModelAlias:
          type: string
          title: Servedmodelalias
        endpointUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpointurl
        checkpoint:
          anyOf:
            - $ref: '#/components/schemas/CheckpointRef'
            - type: 'null'
        isOnDemand:
          type: boolean
          title: Isondemand
        replicas:
          anyOf:
            - type: integer
            - type: 'null'
          title: Replicas
        gpusPerReplica:
          anyOf:
            - type: integer
            - type: 'null'
          title: Gpusperreplica
        maxReplicas:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maxreplicas
        scaleState:
          anyOf:
            - type: string
            - type: 'null'
          title: Scalestate
        createdAt:
          type: string
          format: date-time
          title: Createdat
        dashboardUrl:
          type: string
          title: Dashboardurl
      type: object
      required:
        - id
        - deploymentName
        - status
        - servedModelAlias
        - isOnDemand
        - createdAt
        - dashboardUrl
      title: InferenceDeployment
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    JobStatus:
      type: string
      enum:
        - PENDING
        - DEPLOYING
        - RUNNING
        - TERMINATING
        - COMPLETED
        - FAILED
        - STOPPED
        - UNKNOWN
        - TOMBSTONED
      title: JobStatus
    CheckpointRef:
      properties:
        runId:
          type: string
          title: Runid
        step:
          type: integer
          title: Step
      type: object
      required:
        - runId
        - step
      title: CheckpointRef
      description: Step `step` of training run `run_id`.
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.