LLMR: Interface for Large Language Model APIs in R

Provides a unified interface to interact with multiple Large Language Model (LLM) APIs. The package supports text generation, embeddings, and parallelization. Users can switch between different LLM providers seamlessly within R workflows, or call multiple models in parallel. The package enables creation of LLM agents for automated tasks and provides consistent error handling across all supported APIs. APIs include 'OpenAI' (see <https://platform.openai.com/docs/overview> for details), 'Anthropic' (see <https://docs.anthropic.com/en/api/getting-started> for details), 'Groq' (see <https://console.groq.com/docs/api-reference> for details), 'Together AI' (see <https://docs.together.ai/docs/quickstart> for details), 'DeepSeek' (see <https://api-docs.deepseek.com> for details), 'Gemini' (see <https://aistudio.google.com> for details), and 'Voyage AI' (see <https://docs.voyageai.com/docs/introduction> for details).

Version: 0.3.0
Depends: R (≥ 4.1.0)
Imports: httr2, purrr, dplyr, rlang, memoise, future, future.apply, tibble
Suggests: testthat (≥ 3.0.0), roxygen2 (≥ 7.1.2), httptest2, progressr, knitr, rmarkdown, ggplot2
Published: 2025-05-27
DOI: 10.32614/CRAN.package.LLMR
Author: Ali Sanaei [aut, cre]
Maintainer: Ali Sanaei <sanaei at uchicago.edu>
BugReports: https://github.com/asanaei/LLMR/issues
License: MIT + file LICENSE
URL: https://github.com/asanaei/LLMR
NeedsCompilation: no
Materials: README
CRAN checks: LLMR results

Documentation:

Reference manual: LLMR.pdf
Vignettes: Doing Research with Parallel LLM API Calls (source, R code)
Presidential Speech Analysis with Embeddings (source, R code)

Downloads:

Package source: LLMR_0.3.0.tar.gz
Windows binaries: r-devel: LLMR_0.2.5.zip, r-release: LLMR_0.3.0.zip, r-oldrel: LLMR_0.3.0.zip
macOS binaries: r-release (arm64): LLMR_0.3.0.tgz, r-oldrel (arm64): LLMR_0.3.0.tgz, r-release (x86_64): LLMR_0.3.0.tgz, r-oldrel (x86_64): LLMR_0.3.0.tgz
Old sources: LLMR archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=LLMR to link to this page.

mirror server hosted at Truenetwork, Russian Federation.