---
title: "Download a model from HuggingFace"
method: POST
path: "/v1/models/download"
tags: ["Models"]
---

# Download a model from HuggingFace

`POST /v1/models/download`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/models/download`
- Auth: HTTP bearer

## Request body

- object
  - `repo` string, required: HuggingFace repo (e.g. "TheBloke/Llama-2-7B-GGUF")
  - `file` string, required: Filename to download
  - `size` integer: Expected file size in bytes (optional)
  - `pipelineTag` string: HuggingFace pipeline_tag (e.g. text-generation, image-to-text). Improves category inference when provided — takes priority over filename-based detection. Case-insensitive.

## Response `200`

Download started

- object
  - `ok` true, required
  - `id` string, required: Download ID for tracking
  - `repo` string, required
  - `file` string, required

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
