LiteLLM
The openai/ prefix and an api_base.
Public
Install litellm, then prefix the model with openai/ and pass Pollio's base URL.
Fig. I, hello.py
# pip install litellm
import litellm
response = litellm.completion(
model="openai/deepseek/deepseek-v4.1-flash",
api_base="https://api.pollio.ai/v1",
api_key="pl-live-...",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Private
Start pollio proxy on your machine, then point LiteLLM at it instead.
Fig. II, hello.py
# pip install litellm
import litellm
response = litellm.completion(
model="openai/deepseek/deepseek-v4.1-flash",
api_base="http://127.0.0.1:8787/v1",
api_key="pl-live-...",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Always pass api_base: without it LiteLLM sends the request, and your key, to OpenAI.
Names and logos belong to their owners. No endorsement implied.