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