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

# Delete a checkpoint

> Permanently deletes a Loops checkpoint that no run, deployment, or sampler is using.



## OpenAPI

````yaml delete /v1/loops/checkpoints/{checkpoint_id}
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/{checkpoint_id}:
    parameters:
      - $ref: '#/components/parameters/checkpoint_id'
    delete:
      summary: Deletes a Loops checkpoint
      description: >-
        Deletes a Loops checkpoint by ID and returns its tombstone. The
        checkpoint disappears from listings and can't be loaded, sampled, or
        deployed. Deletion is permanent, and storage for some checkpoints is
        reclaimed later. A checkpoint that is deployed, read by an unfinished
        LoRA merge, served by an active sampler, or the start of an active run
        can't be deleted, and the error says which. Deleting an already-deleted
        checkpoint returns the same tombstone.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoopsCheckpointTombstoneV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request DELETE \
            --url https://api.baseten.co/v1/loops/checkpoints/{checkpoint_id} \
            --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/loops/checkpoints/{checkpoint_id}"

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

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

            print(response.text)
components:
  parameters:
    checkpoint_id:
      schema:
        type: string
      name: checkpoint_id
      in: path
      required: true
  schemas:
    LoopsCheckpointTombstoneV1:
      description: A Loops checkpoint whose delete was accepted.
      properties:
        id:
          description: The deleted checkpoint ID.
          title: Id
          type: string
        run_id:
          description: The ID of the run that produced the checkpoint.
          title: Run Id
          type: string
        checkpoint_id:
          description: The name the checkpoint was saved under.
          title: Checkpoint Id
          type: string
        target:
          $ref: '#/components/schemas/TrainerCheckpointTarget'
          description: Whether the checkpoint was loadable by the sampler or by the run.
        path:
          description: The checkpoint's bt:// path.
          title: Path
          type: string
      required:
        - id
        - run_id
        - checkpoint_id
        - target
        - path
      title: LoopsCheckpointTombstoneV1
      type: object
    TrainerCheckpointTarget:
      description: >-
        Whether a TrainerServerCheckpoint is loadable by the sampler or the
        trainer.


        SAMPLER checkpoints are consumed by the sampling server for inference;

        TRAINER checkpoints capture full trainer state for resuming training.

        Mirrored in the bt:// URI as

        ``bt://loops:<trainer_id>/(sampler_weights|weights)/<name>``.
      enum:
        - sampler
        - trainer
      title: TrainerCheckpointTarget
      type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````