{"uid":"cap_C5Mv9OIPLv3RjZt8wdBm4","slug":"generate-tutorial-code-agent-x402-usdc-on-base-17efb2c7","name":"Generate Tutorial — Code Agent (x402, USDC on Base)","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/generate-tutorial","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"topic":{"type":"string","description":"Tutorial topic"},"language":{"type":"string","default":"English","description":"Natural language"}}},"responseSchema":{"type":"json","example":{"paid":"0.25 USDC","result":{"code":"// generated output","model":"glm-5.1","tokens":100},"txHash":"0x...","service":"generate-tutorial"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","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.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ukz7r2mtj-jdzWK1gGSkC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a step-by-step coding tutorial on a given topic, powered by GLM-5.2 and billed at $0.25 USDC per call via the x402 payment standard.","exampleAgentPrompt":"Generate a step-by-step coding tutorial on building a REST API with Python Flask — write it in English.","exampleUseCases":[{"title":"Onboarding docs for new developers","prompt":"Can you generate a beginner-friendly tutorial in English on how to set up and use Docker containers? I want something step-by-step that a junior dev could follow."},{"title":"Smart contract learning guide","prompt":"Write me a tutorial on how to write and deploy a basic ERC-20 token in Solidity — keep it in English and make it practical with code examples."},{"title":"Language-localized coding walkthrough","prompt":"Generate a tutorial on how to implement a binary search algorithm in Python, but write the explanations in Spanish so my team can read it."}],"resultDescription":"Returns a JSON object containing the generated tutorial content (code and explanatory text) under result.code, the model used (e.g. glm-5.1), token count consumed, the x402 transaction hash confirming the $0.25 USDC payment, and the service name 'generate-tutorial'.","failureModes":["Payment failure: insufficient USDC balance or invalid x402 payment header returns 402 Payment Required","Missing topic field: request without a topic may return a 400 Bad Request or empty/generic output","Model unavailability: if GLM backend is down, may return 500 Internal Server Error","Language not supported: unusual language codes may fall back to English silently","Rate limiting: high-frequency requests from same wallet may be throttled"],"whenToPreferThis":"Choose this endpoint when you need an AI-generated, structured coding tutorial on a specific programming topic and want to pay per request without a subscription, using USDC on Base via the x402 standard. It is particularly useful for agents automating developer onboarding content, documentation generation, or educational material pipelines in a trustless, pay-per-use fashion.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:34:07.416Z","isFirstParty":false}