Python SDK
Use the official OpenAI Python SDK with our API
Installation
pip install openaiBasic Usage
from openai import OpenAI
BASE_URL = "https://api.llmzone.net/v1"
API_KEY = "YOUR_API_KEY"
def main():
client = OpenAI(
api_key=API_KEY,
base_url=BASE_URL,
)
response = client.chat.completions.create(
model="claude-opus-4-6",
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(response.choices[0].message.content)
if __name__ == "__main__":
main()Expected Output
Hello! How are you doing today? Is there something I can help you with?