% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/download.R
\name{lms_download}
\alias{lms_download}
\title{Download a model via REST API}
\usage{
lms_download(model, quantization = NULL, host = "http://localhost:1234", ...)
}
\arguments{
\item{model}{Character. The model to download. Accepts model catalog
identifiers (e.g., "openai/gpt-oss-20b") and exact Hugging Face links.}

\item{quantization}{Character. Optional. Quantization level of the model to
download (e.g., "Q4_K_M"). Only supported for Hugging Face links.}

\item{host}{Character. The host address of the local server. Defaults to
"http://localhost:1234".}

\item{...}{Additional arguments passed to the request.}
}
\value{
A character string containing the download \code{job_id}, or
\code{"already_downloaded"} if already downloaded.
}
\description{
Download a model via REST API
}
\examples{
\dontrun{
lms_server_start()

# Download a model by its HuggingFace identifier
job_id <- lms_download("google/gemma-3-1b")

# Download with a specific quantization level
lms_download("google/gemma-3-1b", quantization = "4bit")
}
}
\seealso{
\href{https://lmstudio.ai/docs/developer/rest/download}{LM Studio Download Model API}
}
