{"uid":"cap_XPtV2OqKrS3fxhiXXMD4A","slug":"code-explanation-via-x402-code-mamenesia-com-44de594e","name":"Code Explanation via x402 (code.mamenesia.com)","description":"Pay-per-request AI developer tools in USDC on Base. Generate code, audit smart contracts, review diffs, summarize text, and convert data formats via the x402 payment standard. Powered by glm-5.2.","url":"https://code.mamenesia.com/service/explain-code","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"prompt":{"type":"string","description":"Paste code to explain"}}},"responseSchema":{"type":"json","example":{"paid":"1 USDC","result":{"code":"// generated output","model":"glm-5.1","tokens":100},"txHash":"0x...","service":"explain-code"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"1","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":"$1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XPTLMn_0E3QJ7xEqtKqDh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Accepts a code snippet and returns a plain-language explanation of what it does, powered by GLM-5.2, billed at $1 USDC per call via x402.","exampleAgentPrompt":"Can you explain what this code does? Here's the snippet: `function debounce(fn, delay) { let timer; return function(...args) { clearTimeout(timer); timer = setTimeout(() => fn.apply(this, args), delay); }; }`","exampleUseCases":[{"title":"Onboard junior developer to codebase","prompt":"I have a new dev who doesn't understand this legacy function — can you explain what it does line by line? Here's the code: `function mergeSort(arr) { if (arr.length <= 1) return arr; const mid = Math.floor(arr.length/2); return merge(mergeSort(arr.slice(0,mid)), mergeSort(arr.slice(mid))); }`"},{"title":"Understand open-source library internals","prompt":"I'm trying to use this open-source middleware but I don't get what it's doing under the hood — can you explain this snippet? `app.use((req, res, next) => { req.startTime = Date.now(); res.on('finish', () => console.log(Date.now() - req.startTime)); next(); })`"},{"title":"Non-technical stakeholder code review","prompt":"My CTO sent me this Solidity snippet and I need to understand what it does before our meeting — can you explain it in plain English? `modifier onlyOwner() { require(msg.sender == owner, 'Not owner'); _; }`"}],"resultDescription":"A JSON object containing the plain-language explanation of the submitted code under `result.code`, the model used (`result.model`, e.g. 'glm-5.1'), the token count (`result.tokens`), the amount paid (`paid`, e.g. '1 USDC'), the blockchain transaction hash (`txHash`), and the service identifier (`service: 'explain-code'`).","failureModes":["Payment failure: insufficient USDC balance or x402 payment not accepted — returns payment error","Empty or missing prompt field: returns validation error","Code snippet too large for token limit: may return truncated or error response","Model unavailability: GLM-5.2 backend down — returns 5xx error","Ambiguous or non-code input: may produce low-quality or irrelevant explanation"],"whenToPreferThis":"Choose this endpoint when you need a pay-per-use, no-subscription code explanation service billed in USDC on Base via x402. Ideal for agents that handle sporadic code analysis tasks without committing to a monthly API plan, or when operating in a crypto-native payment environment. Best for single-snippet explanations; not suited for large-scale batch code review pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:35:32.082Z","isFirstParty":false}