{"openapi":"3.1.0","info":{"title":"Probability API","version":"1.0.0","description":"Probability distributions and combinatorics as an API. The binomial endpoint gives the probability of exactly k successes in n trials (PMF), the cumulative probability up to k (CDF), and the mean, variance and standard deviation. The poisson endpoint does the same for the Poisson distribution from a rate λ. The normal endpoint computes the z-score, probability density, cumulative probability (CDF) and percentile for a value under a normal distribution with any mean and standard deviation — and runs in reverse, turning a probability into the value (the quantile / inverse CDF) and its z-score. The combinatorics endpoint computes combinations (nCr), permutations (nPr) and factorials with exact big-integer arithmetic. Everything is computed locally and deterministically, so it is instant and private. Ideal for data science and statistics, quality control and A/B-test planning, gaming and gambling odds, risk modelling, and statistics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is probability theory; for descriptive statistics on a dataset use a statistics API and for general expression evaluation use a math API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/probability-api","description":"oanor gateway"}],"tags":[{"name":"Probability"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/binomial":{"get":{"operationId":"get_v1_binomial","tags":["Probability"],"summary":"Binomial distribution","description":"","parameters":[{"name":"n","in":"query","required":true,"description":"Trials","schema":{"type":"string"},"example":"10"},{"name":"p","in":"query","required":true,"description":"Success probability","schema":{"type":"string"},"example":"0.5"},{"name":"k","in":"query","required":true,"description":"Successes","schema":{"type":"string"},"example":"5"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"k":5,"n":10,"p":0.5,"sd":1.5811388,"cdf":0.62304687,"pmf":0.24609375,"mean":5,"variance":2.5,"distribution":"binomial"},"meta":{"timestamp":"2026-06-03T17:42:05.800Z","request_id":"24f85575-cfdf-4965-98b9-785c69e06e5f"},"status":"ok","message":"Binomial","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/combinatorics":{"get":{"operationId":"get_v1_combinatorics","tags":["Probability"],"summary":"nCr / nPr / factorial","description":"","parameters":[{"name":"n","in":"query","required":true,"description":"Total","schema":{"type":"string"},"example":"52"},{"name":"r","in":"query","required":false,"description":"Chosen","schema":{"type":"string"},"example":"5"},{"name":"op","in":"query","required":false,"description":"combinations|permutations|factorial","schema":{"type":"string"},"example":"combinations"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"n":52,"r":5,"op":"combinations","result":"2598960","notation":"C(52,5)"},"meta":{"timestamp":"2026-06-03T17:42:05.902Z","request_id":"8c38d880-bcaa-4d7a-ab3e-add64497eb8f"},"status":"ok","message":"Combinatorics","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/normal":{"get":{"operationId":"get_v1_normal","tags":["Probability"],"summary":"Normal distribution","description":"","parameters":[{"name":"x","in":"query","required":false,"description":"A value","schema":{"type":"string"},"example":"1.96"},{"name":"mean","in":"query","required":false,"description":"Mean (default 0)","schema":{"type":"string"},"example":"0"},{"name":"sd","in":"query","required":false,"description":"SD (default 1)","schema":{"type":"string"},"example":"1"},{"name":"probability","in":"query","required":false,"description":"Or a probability -> quantile","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"x":1.96,"sd":1,"cdf":0.97500217,"pdf":0.058440944,"mean":0,"z_score":1.96,"percentile":97.5002,"upper_tail":0.024997826,"distribution":"normal"},"meta":{"timestamp":"2026-06-03T17:42:05.984Z","request_id":"83f4d450-acf3-443c-a5d4-7e28bdd83ab6"},"status":"ok","message":"Normal","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/poisson":{"get":{"operationId":"get_v1_poisson","tags":["Probability"],"summary":"Poisson distribution","description":"","parameters":[{"name":"lambda","in":"query","required":true,"description":"Rate","schema":{"type":"string"},"example":"3"},{"name":"k","in":"query","required":true,"description":"Occurrences","schema":{"type":"string"},"example":"2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"k":2,"sd":1.7320508,"cdf":0.42319008,"pmf":0.22404181,"mean":3,"lambda":3,"variance":3,"distribution":"poisson"},"meta":{"timestamp":"2026-06-03T17:42:06.098Z","request_id":"707912c7-6a07-47c9-8870-09b756c87858"},"status":"ok","message":"Poisson","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Probability API","notes":"Normal CDF via the erf approximation; inverse via Acklam's algorithm. Combinatorics is exact big-integer. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/binomial","params":{"k":"successes","n":"trials","p":"success probability 0-1"},"returns":"PMF, CDF, mean, variance, sd"},{"path":"/v1/poisson","params":{"k":"occurrences","lambda":"rate"},"returns":"PMF, CDF, mean, variance, sd"},{"path":"/v1/normal","params":{"x":"a value","sd":"default 1","mean":"default 0","probability":"or a probability to get the quantile"},"returns":"z-score, PDF, CDF and percentile (or the value for a probability)"},{"path":"/v1/combinatorics","params":{"n":"total","r":"chosen","op":"combinations|permutations|factorial"},"returns":"the exact count"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Probability distributions and combinatorics as an API. The binomial endpoint gives the probability of exactly k successes in n trials (PMF), the cumulative probability up to k (CDF), and the mean, variance and standard deviation. The poisson endpoint does the same for the Poisson distribution from a rate λ. The normal endpoint computes the z-score, probability density, cumulative probability (CDF) and percentile for a value under a normal distribution with any mean and standard deviation — and runs in reverse, turning a probability into the value (the quantile / inverse CDF) and z-score. The combinatorics endpoint computes combinations (nCr), permutations (nPr) and factorials with exact big-integer arithmetic. Everything is computed locally and deterministically, so it is instant and private. Ideal for data science and statistics, quality control and A/B-test planning, gaming and gambling odds, risk modelling, and statistics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is probability theory; for descriptive statistics on a dataset use a statistics API and for general expression evaluation use a math API."},"meta":{"timestamp":"2026-06-03T17:42:06.195Z","request_id":"f7248d98-e4ce-4133-94a4-949619da495e"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":8035,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":955,"monthly_call_quota":17550,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2945,"monthly_call_quota":226500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6745,"monthly_call_quota":1175000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/probability-api"}