> ## 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.

# Set the target snapshot

> Sets the snapshot that replicas of an RL deployment should load.

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


## OpenAPI

````yaml post /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'
    post:
      summary: Sets the snapshot a deployment's replicas hot-load
      description: >-
        Stores the request as the deployment's RL weight-sync target; every
        replica loads it, and the newest request wins. Returns 400 if the body
        is not a JSON object of at most 16384 bytes as compact JSON, or has an
        invalid identity or incremental_snapshot_metadata. Snapshots are not
        checked here; a replica that rejects one reports it in its status. Only
        RL deployments can hot-load, and source.token and source.api are not
        accepted.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HotLoadRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HotLoadResponseV1'
      x-codeSamples:
        - lang: bash
          source: >-
            curl --request POST \

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

            --header "Authorization: Bearer $BASETEN_API_KEY" \

            --data '{
              "identity": null,
              "incremental_snapshot_metadata": null
            }'
        - 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(
                "POST",
                url,
                headers=headers,
                json={'identity': None, 'incremental_snapshot_metadata': None}
            )


            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:
    HotLoadRequestV1:
      additionalProperties: true
      description: >-
        The snapshot the deployment's replicas should load. Other keys are
        passed through.
      properties:
        identity:
          description: >-
            Snapshot directory below the checkpoint prefix, for example,
            anchors/step000001.
          title: Identity
          type: string
        incremental_snapshot_metadata:
          anyOf:
            - $ref: '#/components/schemas/HotLoadIncrementalSnapshotMetadataV1'
            - type: 'null'
          default: null
          description: Required when identity is a delta snapshot.
      required:
        - identity
      title: HotLoadRequestV1
      type: object
    HotLoadResponseV1:
      description: The stored hot-load target.
      properties:
        revision:
          description: Revision of the stored target; grows with every request.
          title: Revision
          type: integer
      required:
        - revision
      title: HotLoadResponseV1
      type: object
    HotLoadIncrementalSnapshotMetadataV1:
      additionalProperties: true
      description: The formats a delta snapshot is encoded with.
      properties:
        compression_format:
          description: The delta's compression format.
          title: Compression Format
          type: string
        checksum_format:
          description: The delta's checksum format.
          title: Checksum Format
          type: string
      required:
        - compression_format
        - checksum_format
      title: HotLoadIncrementalSnapshotMetadataV1
      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.

````