- Direct SDK integration - Using the LiteLLM Python SDK
- Proxy Server integration - Using LiteLLM as an OpenAI-compatible proxy
Prerequisites
For both integration methods, you’ll need:LITELLM_API_KEY.
SDK Integration
TheLiteLLM class provides direct integration with the LiteLLM Python SDK.
Basic Usage
Using Hugging Face Models
LiteLLM can also work with Hugging Face models:Configuration Options
TheLiteLLM class accepts the following parameters:
Examples
View more examples here.