Skip to main content

LiteLLM

LiteLLM works out of the box.
import litellm

response = litellm.completion(
    model="openai/your-model-name",   # or the provider prefix you configured
    messages=[{"role": "user", "content": "hi"}],
    api_base="https://api.openference.com/v1",
    api_key="sk-token-YOUR_KEY"
)
You can also register Openference as a custom provider in your LiteLLM config. All the normal LiteLLM features (fallbacks, logging, guardrails) continue to work.