API & SDKs
Reality Signal is an API for decision systems. You send a model score (or feature payload) and receive a calibrated probability (prob_est), an uncertainty estimate, and a boolean decision flag computed against your configured threshold.
Authentication
Include your key in the x-api-key header.
All requests require an API key header:
x-api-key: YOUR_API_KEYBase URL
Quickstart (Python)
Minimal integration: call /decide, store decision_id, then close the loop with /feedback.
import requests
API_URL = "https://onprem-api-sowl.jollysand-1b9ed42e.swedencentral.azurecontainerapps.io"
HEADERS = {"x-api-key": "YOUR_API_KEY"}
# Score-based payload (quick integration)
payload = {"features": {"score": 0.82}}
res = requests.post(f"{API_URL}/decide", json=payload, headers=HEADERS)
res.raise_for_status()
data = res.json()
decision_id = data["decision_id"]
prob_est = data["prob_est"]
uncertainty = data["uncertainty"]
decision = data["decision"]
print(decision_id, prob_est, uncertainty, decision)
# Later, once ground truth is known:
feedback = {"decision_id": decision_id, "feedback": 1, "force_retrain": False}
requests.post(f"{API_URL}/feedback", json=feedback, headers=HEADERS).raise_for_status()
POST /decide
featuresrequiredcurl -X POST https://onprem-api-sowl.jollysand-1b9ed42e.swedencentral.azurecontainerapps.io/decide -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"features": { "score": 0.82 }
}'curl -X POST https://onprem-api-sowl.jollysand-1b9ed42e.swedencentral.azurecontainerapps.io/decide -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"features": {
"user_region": "North",
"request_value": 4500,
"historical_count": 12
}
}'decision_idrequiredprob_estrequireduncertaintyrequireddecisionrequired{
"decision_id": 123,
"prob_est": 0.62,
"uncertainty": 0.08,
"decision": false
}POST /feedback
Send ground truth back to Reality Signal. This powers drift detection and continuous calibration improvements.
decision_idrequiredfeedbackrequiredforce_retrainoptionalcurl -X POST https://onprem-api-sowl.jollysand-1b9ed42e.swedencentral.azurecontainerapps.io/feedback -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"decision_id": 123,
"feedback": 1,
"force_retrain": false
}'POST /configure
Configure decision thresholds and economics. You can set a probability threshold for the decision flag, plus uncertainty guardrails and cost/loss parameters.
thresholdoptionaluncertainty_thresholdoptionalcostoptionallossoptionalfeedback_fractionoptionalcurl -X POST https://onprem-api-sowl.jollysand-1b9ed42e.swedencentral.azurecontainerapps.io/configure -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"threshold": 0.70,
"uncertainty_threshold": 0.05,
"cost": 15.0,
"loss": 200.0,
"feedback_fraction": 0.05
}'Operations endpoints
Force the system to update based on the entire historical dataset immediately.
Permanently deletes historical data and resets configuration to defaults. Use with caution.
Verify service and database connectivity.
Errors
- • 400: invalid request / missing fields
- • 401 / 403: missing or invalid x-api-key
- • 500: server error