{"uid":"cap_XRB7lN-S8uWGMlAwATs7U","slug":"sindri-primality-test-miller-rabin-6980a7e8","name":"Sindri Primality Test (Miller-Rabin)","description":"Deterministic primality test using the Miller-Rabin algorithm with a witness set proven deterministic for all integers below 3.3x10^24, safely covering the full JavaScript safe-integer range.","url":"https://x402.outpimp.com/isPrime","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"number","description":"Non-negative integer to test (0 to 2^53 - 1)."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yfcSzB3aB-kPT30_s2MQT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Tests whether a given non-negative integer is prime using a deterministically correct Miller-Rabin algorithm, covering all integers up to 2^53-1 (JavaScript safe integer range).","exampleAgentPrompt":"Is 982451653 a prime number? Run it through that deterministic Miller-Rabin primality test.","exampleUseCases":[{"title":"Cryptographic key candidate screening","prompt":"I need to check whether 9007199254740881 is a prime number before using it in a key generation routine — can you verify it's prime?"},{"title":"Math homework prime verification","prompt":"My student worksheet says 104729 is prime — can you confirm that's actually true?"},{"title":"Competitive programming integer check","prompt":"For my algorithm challenge, I need to know if 15485863 is a prime number right now."}],"resultDescription":"Returns a JSON response indicating whether the submitted integer is prime (true/false), computed deterministically using the Miller-Rabin algorithm with a proven witness set — no probabilistic false positives for any value up to 2^53-1.","failureModes":["Input n is outside the valid range [0, 2^53-1] — returns an error or undefined behavior","Input n is not an integer (e.g. a float) — may be rejected or rounded","Missing required field 'n' — returns a validation error","Network or payment failure (x402 protocol) — call does not complete"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, guaranteed-correct primality answer for any integer within JavaScript's safe integer range (up to ~9 quadrillion). Unlike probabilistic primality tests, this uses a fixed witness set proven to be deterministic below 3.3×10^24, making it suitable for cryptographic screening, competitive programming, or anywhere false positives are unacceptable. Prefer this over rolling your own Miller-Rabin or using probabilistic tests when correctness matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:49:50.006Z","isFirstParty":false}