Elevate performance, reduce costs, and gain unparalleled insights with Optiio's enterprise-grade LLM middleware
Our advanced algorithms automatically select the most cost-effective model for each task, optimizing your resource allocation and reducing expenses.
Gain deep insights into your LLM usage, performance metrics, and cost analysis with our comprehensive analytics dashboard.
Want to optimize your token space? Add in custom hooks? Run serverless middleware functions? Optiio can help.
from openai import OpenAI
from os import getenv
# gets API Key from environment variable OPENAI_API_KEY
client = OpenAI(
base_url="https://optiio.xyz/api/chat/completions",
api_key=getenv("OPTIIO_API_KEY"),
)
completion = client.chat.completions.create(
extra_headers={
"session": "123213-1231312-123123-1231-23"
#you can add extras like a session for more advanced tracking and stateful optimistations
},
model="optiio-router",
messages=[
{
"role": "user",
"content": "Say this is a test",
},
],
)
print(completion.choices[0].message.content)
With Optiio, you never have to compromise on security. Our platform is built from the ground up with enterprise-level data protection and privacy measures.