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

# Deploy checkpoints

> Creates an inference deployment from one or more Loops sampler checkpoints.



## OpenAPI

````yaml post /v1/loops/checkpoints/deploy
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/loops/checkpoints/deploy:
    post:
      summary: Deploys Loops checkpoints
      description: >-
        Creates an inference deployment from one or more Loops sampler
        checkpoints. Confirm the user intends to create billable resources
        before calling it. This operation is not idempotent; repeating the
        request can create another deployment.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeployLoopsCheckpointRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeployLoopsCheckpointResponseV1'
      x-codeSamples:
        - lang: bash
          source: |-
            curl --request POST \
            --url https://api.baseten.co/v1/loops/checkpoints/deploy \
            --header "Authorization: Bearer $BASETEN_API_KEY" \
            --data '{
              "checkpoint_ids": null,
              "model_name": null,
              "instance_type_id": null,
              "hf_secret_name": 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/loops/checkpoints/deploy"

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

            response = requests.request(
                "POST",
                url,
                headers=headers,
                json={'checkpoint_ids': None, 'model_name': None, 'instance_type_id': None, 'hf_secret_name': None}
            )

            print(response.text)
components:
  schemas:
    DeployLoopsCheckpointRequestV1:
      properties:
        checkpoint_ids:
          description: Sampler checkpoint IDs to deploy together.
          items:
            type: string
          minItems: 1
          title: Checkpoint Ids
          type: array
        model_name:
          description: Name for the created model.
          minLength: 1
          title: Model Name
          type: string
        instance_type_id:
          description: Instance type ID for the deployment.
          title: Instance Type Id
          type: string
        hf_secret_name:
          description: Name of the team-scoped secret that supplies HF_TOKEN.
          minLength: 1
          title: Hf Secret Name
          type: string
      required:
        - checkpoint_ids
        - model_name
        - instance_type_id
        - hf_secret_name
      title: DeployLoopsCheckpointRequestV1
      type: object
    DeployLoopsCheckpointResponseV1:
      properties:
        model_id:
          description: ID of the created or updated model.
          title: Model Id
          type: string
        deployment_id:
          description: ID of the created model version deployment.
          title: Deployment Id
          type: string
      required:
        - model_id
        - deployment_id
      title: DeployLoopsCheckpointResponseV1
      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.

````