{"uid":"cap_wtB6qEg8VFsFEclo93jCA","slug":"sindri-miller-rabin-primality-test-2281dd3d","name":"Sindri Miller-Rabin Primality Test","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://ppu43fkyhimq5fiqpmo42eh5ri0yypid.lambda-url.us-east-1.on.aws/isPrime?utm_source=zero.xyz","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_acYtLYVaErxOyOT96kaLt","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":"Deterministically tests whether a non-negative integer up to 2^53-1 is prime using the Miller-Rabin algorithm with a proven deterministic witness set.","exampleAgentPrompt":"Is 9999999999971 a prime number? Use the deterministic Miller-Rabin primality test on it.","exampleUseCases":[{"title":"Cryptographic key candidate validation","prompt":"I'm generating RSA key material and need to confirm whether 3215031751 is actually a prime number before I use it — can you run a deterministic primality test on it?"},{"title":"Math homework or puzzle verification","prompt":"My puzzle says the answer should be a prime number and I got 982451653 — can you verify whether that's actually prime?"},{"title":"Large integer primality screening","prompt":"I'm building a sieve and want to double-check individual candidates — is 9007199254740881 a prime number?"}],"resultDescription":"Returns a boolean indicating whether the input integer n is prime (true) or composite/non-prime (false), determined deterministically — no false positives or false negatives for any integer in the range 0 to 2^53-1.","failureModes":["Input n exceeds 2^53-1 (outside JavaScript safe integer range) — may return an error or undefined behavior","Input n is negative — not supported, expect validation error","Non-integer or floating-point input — likely rejected with a schema validation error","Missing required field n — returns a 400 or schema error"],"whenToPreferThis":"Choose this endpoint when you need a provably correct, deterministic primality answer (no probability of error) for integers up to 2^53-1. Unlike probabilistic Miller-Rabin implementations, this uses a witness set mathematically proven to be deterministic up to 3.3×10^24, making it ideal for cryptographic screening, puzzle solving, or any context where a wrong answer is unacceptable. Prefer this over general-purpose math libraries when you want a simple, cheap, pay-per-call API without managing dependencies.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T18:38:48.342Z","isFirstParty":false,"canonicalSlug":"sindri-miller-rabin-primality-test-2281dd3d"}