# tinker_cookbook.weights.download ### [**tinker_cookbook.weights.download**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/weights/_download.py#L16)(*tinker_path*, *output_dir*, *base_url*) Download a checkpoint from Tinker storage to local disk. Fetches a signed URL via the Tinker SDK, downloads the archive, and extracts it with security validation (rejects symlinks and path traversal). **Parameters:** - [**tinker_path**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/weights/_download.py#L16) (*str*) – Tinker checkpoint path, e.g. `"tinker:///sampler_weights/final"`. - [**output_dir**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/weights/_download.py#L16) (*str*) – Local directory where the checkpoint will be extracted. - [**base_url**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/weights/_download.py#L16) (*str | None*) – Custom Tinker service URL. If `None` (default), uses the default Tinker service endpoint (or `TINKER_BASE_URL` environment variable if set). **Returns:** Path to the extracted checkpoint directory. **Raises:** - WeightsDownloadError: If the archive contains unsafe entries. - urllib.error.URLError: If the download fails. ```python from tinker_cookbook import weights # Download from default Tinker service adapter_dir = weights.download( tinker_path="tinker://run-id/sampler_weights/final", output_dir="./adapter", ) # Download from a custom Tinker deployment adapter_dir = weights.download( tinker_path="tinker://run-id/sampler_weights/final", output_dir="./adapter", base_url="https://tinker.my-company.com", ) ```