{"uid":"cap_35N0CgdGFE9QYBcW_PdZb","slug":"number-theory-is-prime-checker-a3c4bb7a","name":"Number Theory Is-Prime Checker","description":"Miller-Rabin primality test (with witnesses that are exact for all 64-bit integers) on an arbitrary-precision integer. Returns { prime }.","url":"https://numtheory.openverbs.com/v1/is-prime","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["n"],"properties":{"n":{"type":"string","pattern":"^\\d+$","description":"Non-negative integer as a decimal string."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_z6n_6q78jMdEW4XGjA6eZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Determines whether a given non-negative integer is a prime number","exampleAgentPrompt":"Is 104729 a prime number? Pass it as a string to the primality checker and tell me the result.","exampleUseCases":[{"title":"Validate prime seed for cryptography","prompt":"I need to know if 7919 is a prime number before I use it as a seed in my cryptographic key generation — can you check that for me?"},{"title":"Educational math homework helper","prompt":"My homework asks me to determine whether 561 is prime or composite. Can you run it through the prime checker and give me the answer?"},{"title":"Filter primes from candidate list","prompt":"I have the number 104729 and I want to know if it's prime — can you check it right now?"}],"resultDescription":"The endpoint returns whether the submitted integer is prime or not, expressed as a boolean or equivalent primality flag, allowing the caller to immediately know the prime status of the input number.","failureModes":["Input 'n' not matching the pattern ^\\d+$ (non-decimal or negative sign included) causes validation error","Empty or missing 'n' field returns a 400-level error","Extremely large integers may cause timeouts or overflow errors","Malformed JSON body results in a parsing error","Non-string type for 'n' (e.g. passing a JSON number instead of string) fails schema validation"],"whenToPreferThis":"Choose this endpoint when you need a fast, on-demand primality test for a single integer without setting up a local math library. It is ideal for agents performing number-theoretic computations, cryptographic key validation workflows, educational math tools, or any pipeline that needs to gate logic on whether a number is prime. It accepts the integer as a decimal string, making it safe for arbitrarily large numbers that might overflow standard integer types.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:41:21.642Z","isFirstParty":false}