{"uid":"cap_yPhy5tuUshAwuH9nbO1Gx","slug":"euler-totient-function-calculator-27b5df64","name":"Euler Totient Function Calculator","description":"Calculate Euler totient function phi(n) for a given positive integer n.","url":"https://sovereign-x402-zeta.vercel.app/api/v1/sequence/totient","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","properties":{},"additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XjYFgCG_aKIzE1gwGXD4R","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes Euler's totient function φ(n) — the count of positive integers up to n that are coprime to n — for a given positive integer.","exampleAgentPrompt":"What is Euler's totient function φ(n) for n = 360? Calculate how many positive integers up to 360 are coprime to it.","exampleUseCases":[{"title":"RSA cryptography key validation","prompt":"I'm working on RSA encryption and need to know the Euler totient of 3233 — that's p×q where p=53 and q=61. Can you compute φ(3233) for me?"},{"title":"Number theory homework problem","prompt":"For my discrete math assignment, I need to find how many integers from 1 to 100 are coprime to 100. Can you calculate Euler's totient phi(100)?"},{"title":"Modular arithmetic computation","prompt":"I need to compute Euler's totient of 4096 to figure out the modular inverse in my cryptographic protocol. What is φ(4096)?"}],"resultDescription":"Returns the Euler totient value φ(n): the count of positive integers from 1 to n that share no common factor with n (i.e., are coprime to n). For example, φ(12) = 4 because 1, 5, 7, and 11 are coprime to 12.","failureModes":["Non-positive integer input (n ≤ 0) may return an error or undefined behavior","Non-integer or floating-point input may be rejected","Very large integers may cause timeout or overflow","Missing required 'input' body field returns a validation error"],"whenToPreferThis":"Use this endpoint when you need a fast, pay-per-call computation of Euler's totient function without spinning up your own number-theory library or server. Ideal for one-off calculations in cryptographic workflows, educational math tools, or any agent pipeline needing φ(n) as an intermediate step.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:45:28.488Z","isFirstParty":false}