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"}}'

Request fields

FieldTypeRequiredDefaultNotes
inputanyyes-Number, numeric string, arithmetic expression, or text to evaluate.
optionsobjectno-Optional behavior overrides.
options.rounding"nearest" | "floor" | "ceil" | "truncate" | "random" | "none"no"nearest"
  • nearest: round to closest integer.
  • floor: round down.
  • ceil: round up.
  • truncate: drop the decimal part.
  • random: randomly choose floor or ceil.
  • none: returns error: "Rounding set to none requires an integer input." if the input is not an integer or does not evaluate to an integer.
options.aibooleannotrueSet false to skip LLM evaluation; may return upgrade_required for non-LLM plans.

Response fields

FieldTypeNotes
is_oddbooleanPresent on success. True if the evaluated value is odd.
confidencenumber0-1 confidence score for the decision.
method"integer" | "float" | "expression" | "llm"Strategy used to determine oddness.
normalized_inputstringNormalized value used for evaluation.
explanationstringHuman-readable explanation of the result.
errorobjectPresent on non-2xx responses.
error.codestringupgrade_required | ai_disabled | payload_too_large | llm_unavailable | non_integer | rate_limit | daily_limit | monthly_quota | internal_error
error.messagestringShort summary of the error.
error.upgrade_urlstringUpgrade link for upgrade_required responses.
error.limitnumberRate limit threshold for rate limiting errors.
error.reset_atstringISO-8601 timestamp when the limit resets; null when unavailable.