% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/provider-claude-files.R
\name{claude_file_upload}
\alias{claude_file_upload}
\alias{claude_file_list}
\alias{claude_file_get}
\alias{claude_file_download}
\alias{claude_file_delete}
\title{Upload, download, and manage files for Claude}
\usage{
claude_file_upload(
  path,
  base_url = "https://api.anthropic.com/v1/",
  beta_headers = character(),
  credentials = NULL
)

claude_file_list(
  base_url = "https://api.anthropic.com/v1/",
  credentials = NULL,
  beta_headers = character()
)

claude_file_get(
  file_id,
  base_url = "https://api.anthropic.com/v1/",
  credentials = NULL,
  beta_headers = character()
)

claude_file_download(
  file_id,
  path,
  base_url = "https://api.anthropic.com/v1/",
  credentials = NULL,
  beta_headers = character()
)

claude_file_delete(
  file_id,
  base_url = "https://api.anthropic.com/v1/",
  credentials = NULL,
  beta_headers = character()
)
}
\arguments{
\item{path}{Path to download the file to.}

\item{base_url}{The base URL to the endpoint; the default is Claude's
public API.}

\item{beta_headers}{Beta headers to use for the request.}

\item{credentials}{Override the default credentials. You generally should not need this argument; instead set the \code{ANTHROPIC_API_KEY} environment variable. The best place to set this is in \code{.Renviron},
which you can easily edit by calling \code{usethis::edit_r_environ()}.

If you do need additional control, this argument takes a zero-argument function that returns either a string (the API key), or a named list (added as additional headers to every request).}

\item{file_id}{ID of the file to get information about, download, or delete.}
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}

These functions are deprecated in favour of the provider-neutral \link{Chat}
methods: \code{chat$file_upload()}, \code{chat$file_list()}, \code{chat$file_get()},
\code{chat$file_download()}, and \code{chat$file_delete()}.
}
\examples{
\dontrun{
chat <- chat_anthropic()
file <- chat$file_upload("path/to/file.pdf")
chat$chat("Please summarize the document.", file)
}
}
