{"ok":true,"tool":"Permutation and Combination Calculator","operation":"calculate-permutation-combination","description":"Calculate permutation (nPr) and/or combination (nCr) of n items taken r at a time.","method":"POST","endpoint":"/api/permutation-combination-calculator","webUrl":"https://ultraquick.tools/tools/permutation-combination-calculator","parameters":{"type":"object","properties":{"n":{"type":"number","description":"Total number of items"},"r":{"type":"number","description":"Number of items to choose"},"type":{"type":"string","enum":["both","permutation","combination"],"description":"What to compute (default both)"}},"required":["n","r"]},"response":{"type":"object","properties":{"n":{"type":"number"},"r":{"type":"number"},"permutation":{"type":"number"},"combination":{"type":"number"},"result":{"type":"number"}}},"example":{"request":{"n":5,"r":2,"type":"both"},"response_shape":{"type":"object","properties":{"n":{"type":"number"},"r":{"type":"number"},"permutation":{"type":"number"},"combination":{"type":"number"},"result":{"type":"number"}}}},"howToCall":"POST a JSON body to https://ultraquick.tools/api/permutation-combination-calculator. Returns {\"ok\":true,\"result\":{...}} on success or {\"ok\":false,\"error\":\"...\"} on failure. No auth, CORS-enabled.","parametersSummary":"  n (number, required) — Total number of items\n  r (number, required) — Number of items to choose\n  type (string, optional, one of: both|permutation|combination) — What to compute (default both)","curlExample":"curl -X POST https://ultraquick.tools/api/permutation-combination-calculator -H \"Content-Type: application/json\" -d '{\"n\":5,\"r\":2,\"type\":\"both\"}'"}