Overview
- Category
- Math
- API mode
not_available- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/odds-ratio-calculator
Execute availability
This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.
POST /api/v1/tools/odds-ratio-calculator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
exposed_event· number · required- Enter exposed with event.
exposed_no_event· number · required- Enter exposed without event.
control_event· number · required- Enter control with event.
control_no_event· number · required- Enter control without event.
{
"type": "object",
"properties": {
"exposed_event": {
"type": "number",
"description": "Enter exposed with event."
},
"exposed_no_event": {
"type": "number",
"description": "Enter exposed without event."
},
"control_event": {
"type": "number",
"description": "Enter control with event."
},
"control_no_event": {
"type": "number",
"description": "Enter control without event."
}
},
"required": [
"exposed_event",
"exposed_no_event",
"control_event",
"control_no_event"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
odds_ratio· number- Odds ratio produced by the tool.
confidence_interval· string- Approximate 95% CI produced by the tool.
table· array- Two-by-two table produced by the tool.
{
"type": "object",
"properties": {
"odds_ratio": {
"type": "number",
"description": "Odds ratio produced by the tool."
},
"confidence_interval": {
"type": "string",
"description": "Approximate 95% CI produced by the tool."
},
"table": {
"type": "array",
"description": "Two-by-two table produced by the tool."
}
},
"additionalProperties": false
}
Odds Ratio Calculator worked example
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/odds-ratio-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"exposed_event": 40,
"exposed_no_event": 60,
"control_event": 20,
"control_no_event": 80
}'
{
"ok": true,
"data": {
"slug": "odds-ratio-calculator",
"result": {
"values": {
"odds_ratio": 2.666700000000000070343730840249918401241302490234375,
"confidence_interval": "1.4166–5.0199",
"table": [
{
"group": "Exposed",
"event": 40,
"no_event": 60
},
{
"group": "Control",
"event": 20,
"no_event": 80
}
]
},
"display": {
"display": "2.6667"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.