Point the official OpenAI Python SDK at KeyoAPI — same client, different base_url and key.
pip install openai
After sign-up, mint an API key and set:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_KEYO_API_KEY",
base_url="https://www.keyoapi.xyz/v1",
)
resp = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Hello from KeyoAPI"}],
)
print(resp.choices[0].message.content)
Use exact catalog IDs from the static list /pricing-list or interactive /pricing. Free $0 IDs (fair-use) are on /free-models.
base_url.model — IDs are case-sensitive and often include suffixes like :free.