

ellmer
Call LLM APIs from R
ellmer is an R package for working with large language models from multiple providers including OpenAI, Anthropic, Google, AWS, Azure, and many others. It provides a unified interface for chat-based interactions with LLMs, supporting streaming outputs, tool calling, and structured data extraction.
The package uses stateful R6 objects that maintain conversation context across multiple queries, making it straightforward to build interactive chat applications or programmatic workflows. It handles authentication automatically for major cloud providers and offers flexible interaction modes—from interactive console chat sessions to capturing responses as strings for downstream processing. Key features include support for multimodal inputs (text and images), control over streaming behavior, and integration with other Posit LLM tools for RAG, evaluation, and chatbot interfaces.












