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

# Get snapshot loading status

> Gets the target revision and snapshot loading state of each replica in an RL deployment.

For a request example, see [Deploy an RL rollouts model](https://docs.baseten.co/rl-rollouts/deploy.md).


## OpenAPI

````yaml get /v1/models/{model_id}/deployments/{deployment_id}/hot_load
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/models/{model_id}/deployments/{deployment_id}/hot_load:
    parameters:
      - $ref: '#/components/parameters/model_id'
      - $ref: '#/components/parameters/deployment_id'
    get:
      summary: Gets a deployment's RL weight-sync status
      description: >-
        Lists each replica's lifecycle status and RL weight-sync state, with the
        revision of the deployment's newest target. A replica is done with a
        target when its hotload_stage is done and its revision equals the
        deployment's revision. loading_state is null for a replica that has not
        reported a state.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HotLoadStatusV1'
      x-codeSamples:
        - lang: bash
          source: >
            curl --request GET \

            --url
            https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/hot_load
            \

            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: >-
            import requests

            import os

            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")

            url =
            "https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/hot_load"


            headers = {"Authorization": f"Bearer {API_KEY}"}


            response = requests.request(
                "GET",
                url,
                headers=headers,
                json={}
            )


            print(response.text)
components:
  parameters:
    model_id:
      schema:
        type: string
      name: model_id
      in: path
      required: true
    deployment_id:
      schema:
        type: string
      name: deployment_id
      in: path
      required: true
  schemas:
    HotLoadStatusV1:
      description: The RL weight-sync status of every replica in a deployment.
      properties:
        revision:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Revision of the deployment's newest hot-load target, or null if none
            was set.
          title: Revision
        replicas:
          description: One entry per replica.
          items:
            $ref: '#/components/schemas/HotLoadReplicaV1'
          title: Replicas
          type: array
      required:
        - revision
        - replicas
      title: HotLoadStatusV1
      type: object
    HotLoadReplicaV1:
      description: A replica's lifecycle status and RL weight-sync state.
      properties:
        replica_id:
          description: Replica ID, as in the deployment's replicas list.
          title: Replica Id
          type: string
        replica_status:
          description: Replica lifecycle status.
          enum:
            - pending
            - ready
            - not_ready
            - terminating
            - failed
            - unknown
          title: Replica Status
          type: string
        loading_state:
          anyOf:
            - $ref: '#/components/schemas/HotLoadLoadingStateV1'
            - type: 'null'
          description: The replica's weight-sync state, or null if it has not reported one.
      required:
        - replica_id
        - replica_status
        - loading_state
      title: HotLoadReplicaV1
      type: object
    HotLoadLoadingStateV1:
      description: A replica's RL weight-sync state, as last reported by the replica.
      properties:
        hotload_stage:
          description: >-
            One of loading, done, rejected, or error. A replica behind the
            deployment's revision is reported as loading.
          title: Hotload Stage
          type: string
        current_snapshot_identity:
          anyOf:
            - type: string
            - type: 'null'
          description: Identity of the snapshot the replica serves.
          title: Current Snapshot Identity
        target_snapshot_identity:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Identity of the snapshot the replica is loading or last tried to
            load.
          title: Target Snapshot Identity
        reason:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the replica rejected or failed its target.
          title: Reason
        revision:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Revision of the target the replica last took, or null if it has
            taken none.
          title: Revision
      required:
        - hotload_stage
        - current_snapshot_identity
        - target_snapshot_identity
        - reason
        - revision
      title: HotLoadLoadingStateV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````