An Elixir package providing a unified Req-based interface to query 18+ LLM APIs with standardized requests and responses.
ReqLLM is a Req plugin for Elixir that provides a unified interface to interact with multiple large language model (LLM) APIs. It standardizes API calls and responses across 18+ providers, abstracting away their inconsistencies and simplifying AI integration in Elixir applications. The library offers both high-level, Vercel AI SDK-inspired functions and low-level Req plugin access for full HTTP control.
Elixir developers building applications that require integration with multiple LLM providers, such as AI-powered tools, chatbots, or content generation systems. It is particularly suited for teams needing a production-grade, consistent interface to leverage diverse LLM capabilities without managing provider-specific API complexities.
Developers choose ReqLLM for its idiomatic Elixir interface that treats LLM APIs as a commodity, offering consistent abstractions while exposing provider-specific capabilities when needed. Its unique selling points include broad provider support, structured output generation, production-grade streaming with cost tracking, and a two-layer architecture that balances ease of use with low-level control.
Req plugin to query AI providers
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
High-level functions like generate_text and stream_text work uniformly across 18+ providers, abstracting away API inconsistencies as inspired by the Vercel AI SDK, reducing code duplication.
Integrates with major providers including OpenAI, Anthropic, Google Gemini, and Amazon Bedrock, covering 18+ providers with dedicated guides for each, sourced from models.dev.
The generate_object function validates and returns JSON-compatible Elixir maps based on a NimbleOptions schema, enabling type-safe AI responses with zero-copy mapping to provider endpoints.
Stream_text provides real-time token streaming with HTTP/2 support via Finch and concurrent metadata collection for usage tracking, designed for scalable Elixir applications.
Due to a Finch issue, HTTP/2 pools may fail with request bodies over 64KB, requiring manual configuration to HTTP/1 or small prompts, as documented in the streaming section.
Not all providers support every feature; for example, embedding generation is not available for all, and some capabilities like web search are provider-specific, limiting uniformity.
Advanced use cases require understanding model specs, normalization with ReqLLM.model!/1, and reliance on external metadata from models.dev, adding overhead for simple integrations.