HTTP API
The SDK is a thin client over one endpoint, so any language can call Simo directly.
Text
POST https://api.temprl.org/v1/askBase URL
Text
https://api.temprl.orgAlways use HTTPS.
Authentication
Send your API key as a bearer token. Create keys in the console under API keys; they look like simo_sk_... and are shown once.
http
Authorization: Bearer simo_sk_...Keys are secret. Call the API from your server, never from a browser or mobile app where the key would be visible. Revoke a leaked key in the console; it stops working immediately.
Endpoints
| Method | Path | Auth | Purpose |
|---|---|---|---|
POST |
/v1/ask |
API key | Answer questions about a state |
GET |
/v1/models |
none | List models and their availability |
GET |
/health |
none | Service health check |
POST /v1/systemone is the endpoint's previous name. It still works for older integrations; new code should use /v1/ask.
A complete request
curl https://api.temprl.org/v1/ask \
-H "Authorization: Bearer $SIMO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "simo-1-pro",
"state": "The customer says the parcel arrived broken and wants their money back.",
"questions": {"refund": {"type": "noul", "instructions": "The customer asks for a refund"}}}'const res = await fetch("https://api.temprl.org/v1/ask", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SIMO_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
model: "simo-1-pro",
state: "The customer says the parcel arrived broken and wants their money back.",
questions: { refund: { type: "noul", instructions: "The customer asks for a refund" } },
}),
});
if (!res.ok) {
const { error } = await res.json();
throw new Error(`${res.status} ${error.code}: ${error.message}`);
}
const data = await res.json();
console.log(data.answers.refund.noul, res.headers.get("x-simo-cost-usd"));import os, requests
res = requests.post(
"https://api.temprl.org/v1/ask",
headers={"Authorization": f"Bearer {os.environ['SIMO_API_KEY']}"},
json={"model": "simo-1-pro",
"state": "The customer says the parcel arrived broken and wants their money back.",
"questions": {"refund": {"type": "noul", "instructions": "The customer asks for a refund"}}},
timeout=120,
)
res.raise_for_status()
print(res.json()["answers"]["refund"]["noul"]){
"id": "evt_...",
"model": "simo-1-pro",
"answers": {"refund": {"type": "noul", "noul": 0.991}},
"usage": {"input_tokens": 41, "output_tokens": 0, "cost": 0.00000123}
}Conventions
- Bodies are JSON, sent with
Content-Type: application/json. - Successful answers carry
x-request-id(the sameevt_...id asidin the body),x-simo-cost-usd,x-simo-balance-usdandx-simo-latency-ms. Quote the request id to support. - Errors return
{"error": {"code": "...", "message": "..."}}. See Errors. - New fields may be added to responses. Ignore fields you don't use.