Using from LiteLLM
LiteLLM talks to Oraicle as an OpenAI-compatible provider. Nothing needs a
custom handler: prefix the model with openai/, set the base URL, and pass
your Oraicle key.
Get a key from the Dashboard. Keys begin
with oai-.
The proxy
Section titled “The proxy”Add the models you want to config.yaml. The model_name is what your
application asks for; the model under litellm_params is Oraicle’s id, with
openai/ in front so LiteLLM uses its OpenAI-compatible path.
model_list: - model_name: glm-4.7-flash litellm_params: model: openai/zai-org/GLM-4.7-Flash api_base: https://api.oraicle.me/v1 api_key: os.environ/ORAICLE_API_KEY
- model_name: gpt-oss-120b litellm_params: model: openai/openai/gpt-oss-120b api_base: https://api.oraicle.me/v1 api_key: os.environ/ORAICLE_API_KEYThen:
export ORAICLE_API_KEY=oai-...litellm --config config.yamlYour application points at the proxy and asks for glm-4.7-flash.
The Python SDK
Section titled “The Python SDK”Without the proxy, pass the same three values to completion():
import osfrom litellm import completion
response = completion( model="openai/zai-org/GLM-4.7-Flash", api_base="https://api.oraicle.me/v1", api_key=os.environ["ORAICLE_API_KEY"], messages=[{"role": "user", "content": "Hello"}],)
print(response.choices[0].message.content)Streaming works the same way — pass stream=True.
Which models to list
Section titled “Which models to list”Every id from Models can go in the config. For the current list at any moment:
curl https://api.oraicle.me/v1/modelsEach entry carries pricing.input and pricing.output in US dollars per
million tokens, from the same table billing reads.
Costs and limits
Section titled “Costs and limits”Every call is billed per token from your prepaid Oraicle wallet — no
subscription, and no per-model plan to choose. LiteLLM’s own max_budget and
rate-limit settings still apply on top, and are worth setting if the proxy is
shared.
A call that fails before producing anything — a bad model id, an upstream outage — is not billed. A reply that starts streaming and then breaks is billed for the tokens it did produce, because the model produced them. A wallet with no balance returns an error rather than queueing.
Live data from LiteLLM
Section titled “Live data from LiteLLM”Oraicle’s oracles — web, news, weather, stocks, crypto, maps, images — are
switched on with a tools entry of the shape {"type": "weather"}. That is an
extension to the OpenAI request, so LiteLLM will not produce it for you.
To use one, pass it through as an extra body parameter:
response = completion( model="openai/openai/gpt-oss-120b", api_base="https://api.oraicle.me/v1", api_key=os.environ["ORAICLE_API_KEY"], messages=[{"role": "user", "content": "What's the weather in Tokyo?"}], extra_body={"tools": [{"type": "weather"}]},)Standard OpenAI function tools keep working alongside these, and LiteLLM
handles those the usual way. Each oracle lookup is billed once on top of the
tokens, and only when it succeeds — see Live data
(oracles).