Overview of any-llm interfaces
mainany-llm provides two primary ways to interact with LLMs depending on your requirements:
Direct API Functions
Recommended for simple use cases. These are top-level functions:
completion: Chat completions with any provider.embedding: Text embeddings.moderation: Content moderation.responses: Implementation of the OpenResponses API for agentic AI systems.
AnyLLM Class
Recommended for advanced use cases. This provides a lower-level Provider API that allows for metadata access and object reusability.