Practical overview
When it fits
Use Any LLM when building a Python application that should communicate with one or more supported language-model providers through a common interface.
Who it is for
- Python developers integrating language-model inference into applications
- Teams that want to switch among supported providers through a shared interface
Documented uses
- Add a text-completion feature to a Python application.
- Change the target LLM provider without replacing the application's integration interface.
- Use a reusable client for multiple requests or a direct function for scripts and experimentation.
Requirements & limits
The library is open source under the Apache-2.0 license. Installation requires Python 3.11 or newer; API keys are required for the selected providers.
- Install provider-specific SDK extras for the services you plan to use.
- Provider credentials are configured separately, commonly through environment variables.
- The direct function creates a new client per call; the AnyLLM class reuses a client for multiple operations.
- Custom OpenAI-compatible endpoints are documented for gateways or local servers without a dedicated provider entry.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install a provider-specific SDK extra and configure its key
Prepare a Python environment to make requests through one chosen provider.
Before you start
- Python 3.11 or newer
- An API key for the chosen provider
Steps
Install
any-llm-sdkwith the extra for your provider, such as the command below.pip install 'any-llm-sdk[openai]'Set the provider's API key as an environment variable, such as
OPENAI_API_KEY.
Expected outcome
The SDK and the provider credential are configured for use in an application.
Guide limitations
- This covers installation and credential configuration, not a request or deployment.
- The chosen provider must be supported, or the endpoint must be OpenAI-compatible.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 October 2026
- Original website title
- mozilla-ai/any-llm · Official homepage title · retained in its source language

