Integrate astrological and numerological AI oracles into your application.
Base URL:
All API requests require an API key sent via the x-api-key header.
x-api-key: os_live_your_key_here
API keys are issued by the OccultSanctum admin. Each key has daily and monthly request limits. Contact the admin to request access.
POST /api/v1/query
Send a prompt to an oracle and receive an AI-generated response. Each call is stateless â there is no conversation history between requests.
Send a JSON body with Content-Type: application/json.
| Parameter | Type | Description | |
|---|---|---|---|
appname | string | required | The slug (identifier) of the oracle to query. Your API key determines which oracles you can access. |
email | string | required | Email address of the end-user making the request. Used for audit logging. |
prompt | string | required | The question or instruction to send to the oracle. Max 8,000 characters. Include any relevant details (birth date, time, place, etc.) directly in the prompt. |
files | array | optional | Up to 3 file attachments (images or PDFs). See File Attachments for format. Only accepted by oracles that support files. |
{
"success": true,
"response": "Based on your birth chart, the current planetary...",
"usage": {
"input_tokens": 1250,
"output_tokens": 680,
"latency_ms": 2340
},
"rate_limit": {
"daily_remaining": 997,
"monthly_remaining": 29997
}
}
| Field | Type | Description |
|---|---|---|
success | boolean | Always true on success. |
response | string | The AI-generated response text. |
usage.input_tokens | integer | Tokens consumed by the prompt + context. |
usage.output_tokens | integer | Tokens in the generated response. |
usage.latency_ms | integer | Total processing time in milliseconds. |
rate_limit.daily_remaining | integer | Remaining requests today. |
rate_limit.monthly_remaining | integer | Remaining requests this month. |
{
"error": "Daily request limit reached.",
"limit": 1000,
"used": 1000
}
Some oracles accept file attachments (e.g., palm images for palmistry analysis). Files are sent as base64-encoded data in the files array.
| Field | Type | Description |
|---|---|---|
mimeType | string | One of: image/jpeg, image/png, image/gif, image/webp, application/pdf |
base64 | string | Base64-encoded file content. Max 5MB per file. |
{
"appname": "palm-reader",
"email": "user@example.com",
"prompt": "Please analyse my palm",
"files": [
{
"mimeType": "image/jpeg",
"base64": "/9j/4AAQSkZJRgABAQAAAQ..."
}
]
}
| Code | Meaning | Common Cause |
|---|---|---|
400 | Bad Request | Missing required field, invalid email, prompt too long, files not accepted. |
401 | Unauthorized | Missing or invalid API key. |
403 | Forbidden | Key suspended/revoked, IP not allowed, oracle not in your allowed list, oracle not API-enabled. |
404 | Not Found | Oracle slug does not exist or is inactive. |
429 | Rate Limited | Daily or monthly request limit exceeded. |
500 | Server Error | Internal error â retry the request. If persistent, contact the admin. |
Each API key has two configurable limits:
Current remaining allowance is included in every successful response under rate_limit. When a limit is reached, the API returns 429 with details.
There is also a global rate limit of 60 requests per minute per IP address as a safety measure.
curl -X POST /api/v1/query \
-H "Content-Type: application/json" \
-H "x-api-key: os_live_YOUR_KEY_HERE" \
-d '{
"appname": "vedic-oracle",
"email": "user@example.com",
"prompt": "I was born on 15 March 1990 at 14:30 in Mumbai. What does my chart say about career?"
}'
const response = await fetch('/api/v1/query', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'os_live_YOUR_KEY_HERE',
},
body: JSON.stringify({
appname: 'vedic-oracle',
email: 'user@example.com',
prompt: 'Born 15 March 1990, 14:30, Mumbai. Tell me about my career.',
}),
});
const data = await response.json();
console.log(data.response);
import requests
resp = requests.post(
'/api/v1/query',
headers={'x-api-key': 'os_live_YOUR_KEY_HERE'},
json={
'appname': 'vedic-oracle',
'email': 'user@example.com',
'prompt': 'Born 15 March 1990, 14:30, Mumbai. Career analysis please.',
}
)
data = resp.json()
print(data['response'])
import base64, requests
with open('palm.jpg', 'rb') as f:
img_b64 = base64.b64encode(f.read()).decode()
resp = requests.post(
'/api/v1/query',
headers={'x-api-key': 'os_live_YOUR_KEY_HERE'},
json={
'appname': 'palm-reader',
'email': 'user@example.com',
'prompt': 'Please analyse my palm lines.',
'files': [{'mimeType': 'image/jpeg', 'base64': img_b64}]
}
)
print(resp.json()['response'])
OccultSanctum API — Built with â¤ī¸ for astrologers and developers.