Skip to content

Quickstart

Oraicle is an OpenAI-compatible API for open models, plus live-data oracles the model can call while it answers. Point an OpenAI client at the base URL below and use your Oraicle key.

https://api.oraicle.me/v1

Here’s how to make your first API call in various programming languages:

from openai import OpenAI
# Set your API key and base URL
client = OpenAI(
base_url = "https://api.oraicle.me/v1",
# For production, you should not place your key
# in the code but in the environment variables
api_key = "<your_api_key>",
)
# Make a simple chat completion request
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-R1-0528",
messages=[
{"role": "system", "content": "You are a smarter assistant."},
{
"role": "user",
"content":
"In two sentences, what is an API key and why should I keep it secret?"
}
]
)
print(response.choices[0].message.content)

Response:

{
"id": "chatcmpl-123abc456def",
"object": "chat.completion",
"created": 1677858242,
"model": "deepseek-ai/DeepSeek-R1-0528",
"usage": {
"prompt_tokens": 31,
"completion_tokens": 62,
"total_tokens": 93
},
"choices": [
{
"message": {
"role": "assistant",
"content": "An API key is a secret string that identifies your account when your code calls a service, so each request can be authorised and billed to you. Keep it out of client-side code and version control: anyone who has it can make requests, and spend, as you."
},
"finish_reason": "stop",
"index": 0
}
]
}