{"uid":"cap_7H7sfSr2cSh3AVo4mxlUW","slug":"code-agent-node-js-script-generator-x402-usdc-on-base-30722321","name":"Code Agent – Node.js Script Generator (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-script","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"prompt":{"type":"string","description":"What the Node.js script should do"}}},"responseSchema":{"type":"json","example":{"paid":"2 USDC","result":{"code":"// generated output","model":"glm-5.1","tokens":100},"txHash":"0x...","service":"generate-script"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"2","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":"$2/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"2","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"2","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_j45HZcG9KdRFNTQ6gt0ue","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"2","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a Node.js script based on a natural-language prompt, billed at $2 USDC per call via the x402 payment standard on Base.","exampleAgentPrompt":"Write me a Node.js script that watches a local directory for new files and automatically uploads them to an S3 bucket, using environment variables for the credentials.","exampleUseCases":[{"title":"Automated file upload pipeline","prompt":"Write me a Node.js script that monitors a folder called /data/exports for new CSV files and uploads each one to an S3 bucket named my-exports-bucket, using AWS_ACCESS_KEY and AWS_SECRET_KEY from environment variables."},{"title":"API polling and alerting script","prompt":"Generate a Node.js script that polls the CoinGecko API every 60 seconds for the Bitcoin price and sends a console alert whenever the price drops below $50,000."},{"title":"Database query and report exporter","prompt":"Can you write a Node.js script that connects to a PostgreSQL database using a DATABASE_URL environment variable, runs a query to fetch all orders from the last 7 days, and saves the results as a JSON file called recent-orders.json?"}],"resultDescription":"Returns a JSON object containing the generated Node.js code as a string, the model used (e.g. glm-5.1), the token count, the USDC amount paid, and the on-chain transaction hash for the payment.","failureModes":["Insufficient USDC balance or failed x402 payment — returns payment error","Vague or ambiguous prompt resulting in generic or incomplete code output","Model timeout on complex prompts — may return partial code or error","Network error reaching the Base blockchain for payment settlement","Prompt too long or exceeds model context limit — returns truncation error"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-use Node.js script generated without a subscription, billed in USDC on Base via the x402 protocol. It is ideal for agents that need on-demand code generation with on-chain payment receipts, particularly in crypto-native or Web3 development workflows. Prefer alternatives if you need Python, Go, or other languages, or if you require a free-tier or subscription-based code generation service.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:42:57.218Z","isFirstParty":false}