completion() call for every provider. Eden AI is a built-in provider (edenai), so a single EDENAI_API_KEY reaches the whole catalog.
Overview
any-llm lets you talk to any LLM provider through a singlecompletion() interface, so you swap providers by changing one string. You reach models from OpenAI, Anthropic, Google, Mistral and 500+ more behind one key.
You select a model with the provider:model_id syntax. For Eden AI, the provider is edenai and the model id follows Eden AI’s provider/model scheme, for example edenai:anthropic/claude-sonnet-latest. Use the colon form: any-llm deprecates the older slash form, where the provider is separated from the model by /.
Installation
Install any-llm with the Eden AI provider extra:Quick Start
Set your key, then point any-llm at Eden AI by prefixing any model withedenai::
edenai provider automatically uses the Eden AI base URL (https://api.edenai.run/v3) and reads your key from the EDENAI_API_KEY environment variable.
Model naming
Useedenai:<provider>/<model>. any-llm splits on the first colon, so the rest is passed to Eden AI unchanged: for example edenai:anthropic/claude-sonnet-latest or edenai:mistral/mistral-small-latest. To browse every id, see List LLM Models.
Switching models
any-llm’s core benefit: change providers by changing one string. Every Eden AI model is reachable the same way:Streaming
Eden AI supports streaming through any-llm. Passstream=True:
Embeddings
The Eden AI provider also supports embeddings.inputs takes a string or a list of strings:
Environment Variables
Next Steps
- Chat Completions - Core LLM endpoint
- List LLM Models - Browse available providers and models
- aisuite - Another unified LLM interface
- OpenAI SDK (Python) - Direct SDK usage