> ## 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 checkpoint source

> Identifies whether checkpoint files are available through S3 or a volume.



## OpenAPI

````yaml get /v1/loops/checkpoints/{checkpoint_id}/source
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}/source:
    parameters:
      - $ref: '#/components/parameters/checkpoint_id'
    get:
      summary: Gets where a Loops checkpoint's files come from
      description: >-
        Reports how to fetch a checkpoint's files: `s3` when the files endpoint
        serves presigned URLs for it, or `volume` with the ref to pull. Clients
        that download checkpoints should ask here first.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoopsCheckpointSourceResponseV1'
      x-codeSamples:
        - lang: bash
          source: >
            curl --request GET \

            --url
            https://api.baseten.co/v1/loops/checkpoints/{checkpoint_id}/source \

            --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}/source"


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


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


            print(response.text)
components:
  parameters:
    checkpoint_id:
      schema:
        type: string
      name: checkpoint_id
      in: path
      required: true
  schemas:
    LoopsCheckpointSourceResponseV1:
      description: Where a checkpoint's files are fetched from, and how.
      properties:
        source:
          description: >-
            `s3` means the files endpoint serves presigned URLs for this
            checkpoint; `volume` carries the ref to pull instead.
          discriminator:
            mapping:
              s3:
                $ref: '#/components/schemas/LoopsCheckpointS3SourceV1'
              volume:
                $ref: '#/components/schemas/LoopsCheckpointVolumeSourceV1'
            propertyName: kind
          oneOf:
            - $ref: '#/components/schemas/LoopsCheckpointS3SourceV1'
            - $ref: '#/components/schemas/LoopsCheckpointVolumeSourceV1'
          title: Source
      required:
        - source
      title: LoopsCheckpointSourceResponseV1
      type: object
    LoopsCheckpointS3SourceV1:
      description: The checkpoint's files are fetched as presigned URLs, page by page.
      properties:
        kind:
          const: s3
          default: s3
          title: Kind
          type: string
      title: LoopsCheckpointS3SourceV1
      type: object
    LoopsCheckpointVolumeSourceV1:
      description: The checkpoint's files are pulled from a Baseten volume.
      properties:
        kind:
          const: volume
          default: volume
          title: Kind
          type: string
        volume_ref:
          description: >-
            Ref of the volume version holding the checkpoint, as
            `bdn:<namespace>/<volume>:<tag>`.
          title: Volume Ref
          type: string
        path:
          description: Directory inside that version holding the checkpoint's files.
          title: Path
          type: string
      required:
        - volume_ref
        - path
      title: LoopsCheckpointVolumeSourceV1
      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.

````