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

# Deactivate a run

> Shuts down a Loops run by ID, tearing down both the run and its paired sampler. Saved checkpoints remain accessible.



## OpenAPI

````yaml post /v1/loops/runs/{run_id}/deactivate
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/runs/{run_id}/deactivate:
    parameters:
      - $ref: '#/components/parameters/run_id'
    post:
      summary: Deactivates a Loops run
      description: >-
        Shuts down a Loops run by ID, tearing down both the run and its paired
        sampler. Saved checkpoints remain accessible.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeactivateLoopsRunResponseV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request POST \
            --url https://api.baseten.co/v1/loops/runs/{run_id}/deactivate \
            --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/runs/{run_id}/deactivate"

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

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

            print(response.text)
components:
  parameters:
    run_id:
      schema:
        type: string
      name: run_id
      in: path
      required: true
  schemas:
    DeactivateLoopsRunResponseV1:
      description: Response for ``POST /v1/loops/runs/<run_id>/deactivate``.
      properties:
        id:
          description: The deactivated Loops run ID.
          title: Id
          type: string
        base_model:
          description: The base model whose Loops run was deactivated.
          title: Base Model
          type: string
        user:
          $ref: '#/components/schemas/UserV1'
          description: The user who owns the Loops run.
      required:
        - id
        - base_model
        - user
      title: DeactivateLoopsRunResponseV1
      type: object
    UserV1:
      description: A user.
      properties:
        email:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Email of the user.
          title: Email
      title: UserV1
      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.

````