The Skailar SDK for Python provides access to the Skailar API — an OpenAI-compatible, multi-provider LLM gateway — from Python applications.
uv add skailar-ai
# or: pip install skailar-aiThe distribution is named skailar-ai on PyPI; the import is skailar.
import os
from skailar import Skailar
client = Skailar(
api_key=os.environ.get("SKAILAR_API_KEY"), # This is the default and can be omitted
)
completion = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[
{
"role": "user",
"content": "Hello, Skailar",
}
],
)
print(completion.choices[0].message.content)with client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Count to ten."}],
stream=True,
) as stream:
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)An async client (AsyncSkailar) with an identical surface is also available.
Python 3.10+
This project is licensed under the MIT License. See the LICENSE file for details.