API docs
The is-odd.ai API returns a boolean, confidence score, method, normalized input, and explanation.
Endpoint
POST https://api.is-odd.ai/v1/is-odd
curl -X POST https://api.is-odd.ai/v1/is-odd -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"input": 41, "options": {"rounding": "nearest"}}'Examples
curl -X POST https://api.is-odd.ai/v1/is-odd -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"input": 41, "options": {"rounding": "nearest"}}'import fetch from "node-fetch";
const res = await fetch("https://api.is-odd.ai/v1/is-odd", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ input: "Is it odd to alphabetize my cereal?" }),
});
console.log(await res.json());import requests
res = requests.post(
"https://api.is-odd.ai/v1/is-odd",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"input": "2+3*5", "options": {"rounding": "nearest"}}
)
print(res.json())Request fields
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| input | any | yes | - | Number, numeric string, arithmetic expression, or text to evaluate. |
| options | object | no | - | Optional behavior overrides. |
| options.rounding | "nearest" | "floor" | "ceil" | "truncate" | "random" | "none" | no | "nearest" |
|
| options.ai | boolean | no | true | Set false to skip LLM evaluation; may return upgrade_required for non-LLM plans. |
Response fields
| Field | Type | Notes |
|---|---|---|
| is_odd | boolean | Present on success. True if the evaluated value is odd. |
| confidence | number | 0-1 confidence score for the decision. |
| method | "integer" | "float" | "expression" | "llm" | Strategy used to determine oddness. |
| normalized_input | string | Normalized value used for evaluation. |
| explanation | string | Human-readable explanation of the result. |
| error | object | Present on non-2xx responses. |
| error.code | string | upgrade_required | ai_disabled | payload_too_large | llm_unavailable | non_integer | rate_limit | daily_limit | monthly_quota | internal_error |
| error.message | string | Short summary of the error. |
| error.upgrade_url | string | Upgrade link for upgrade_required responses. |
| error.limit | number | Rate limit threshold for rate limiting errors. |
| error.reset_at | string | ISO-8601 timestamp when the limit resets; null when unavailable. |