Python client for Oriora — model selection (decision-only) + OpenAI-compatible routing (Managed API BYOK).
Project description
Oriora Python SDK
Thin Python client for Oriora — Managed API BYOK.
Two ways to use it:
model_select()— decision only. Oriora tells you the best model for a task; you run the call yourself with your own vendor key. Oriora never sees your key, prompt, or output. Flat $0.001 per decision.chat()— OpenAI-compatible. Oriora routes and executes the call server-side using the BYOK vendor key you configured, and returns an OpenAI-shaped response.
Install
pip install oriora
Authenticate
Generate an sk_oriora_ API key in your Oriora account → Settings. Pass it directly or set ORIORA_API_KEY.
from oriora import Oriora
client = Oriora(api_key="sk_oriora_...") # or: Oriora() with ORIORA_API_KEY set
model_select() — decision only (you run the call)
rec = client.model_select(task_type="coding")
# {'model': 'anthropic/claude-sonnet-4.6', 'alternatives': [...], 'task_type': 'coding'}
# Then call that model yourself, with your own vendor key:
import anthropic
anthropic.Anthropic().messages.create(model="claude-sonnet-4.6", messages=[...])
Restrict the recommendation to your own candidate list (your quality order is kept):
client.model_select(task_type="coding", models=["openai/gpt-5", "anthropic/claude-sonnet-4.6"])
Discover the valid task types:
client.task_types()
# ['agentic', 'coding', 'general', 'math', 'reasoning', ...]
chat() — OpenAI-compatible (we run the call via your BYOK key)
First, in your Oriora account, store your vendor key and enable BYOK for an app label (e.g. my-app). Then:
resp = client.chat(
app="my-app", # the BYOK app label you enabled
messages=[{"role": "user", "content": "Explain merge sort in one line."}],
# model defaults to "oriora-auto" — Oriora picks the best model for your prompt
)
print(resp["choices"][0]["message"]["content"])
The response is an OpenAI-shaped ChatCompletion dict (id, choices, usage, …), so existing OpenAI-style code works with minimal changes.
Note:
usagetoken counts onchat()are currently estimated. Specific-model pinning and streaming are not yet supported (usemodel="oriora-auto").
Errors
Non-2xx responses raise OrioraError (with .status_code and .message).
from oriora import OrioraError
try:
client.model_select(task_type="coding")
except OrioraError as e:
print(e.status_code, e.message)
Pricing
model_select()— flat $0.001 / decision.chat()— Managed API BYOK orchestration fee on the call (your vendor bills you directly for the AI usage on your own key).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oriora-0.1.0.tar.gz.
File metadata
- Download URL: oriora-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38372c985ab44c289565f04a2aa49f0e115479a1fe4abb410df69c1580c3fdd8
|
|
| MD5 |
acb8641d8b591982a31fd52369033e89
|
|
| BLAKE2b-256 |
06ffb00a32246a8d91e12a2f11076fd5c5f52904be2a8dc9b329fc1398b60a9d
|
File details
Details for the file oriora-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oriora-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63e073614145756badba58342c04a24140a4becf5a6ceb9d458fc524f458ed21
|
|
| MD5 |
f6a949e8bc3aa3a1eac51a564a554cec
|
|
| BLAKE2b-256 |
ed58f718871603063ac350d1b7bf673e8a8d167ac3ee6de2596594c5c1a3dcd6
|