Pay per request in USDC on Base. Describe what you need, get production-ready code back instantly — no API keys, no sign-ups. Powered by glm-5.2.
Four code services, each billed as a single micropayment. No subscriptions, no rate limits on individual requests.
Describe what you want the script to do. Returns clean, working Node.js code.
POST /service/generate-script
Describe a single function. Returns a well-documented JS function with types.
POST /service/generate-function
Paste your code and describe improvements. Returns refactored version with notes.
POST /service/refactor-code
Paste code. Returns a plain-English explanation suitable for a junior dev.
POST /service/explain-code
The x402 standard turns HTTP 402 into a real payment layer. Three steps from request to code.
POST /service/<id> with a JSON body { "prompt": "..." } describing what you want.
The server replies 402 Payment Required with the exact USDC amount and wallet. Send it on Base.
Re-send the request with header X-Payment: <tx-hash>. The agent verifies on-chain and returns your code.
Every response is clean, documented, and ready to run. Here's a sample from generate-function.
curl -X POST https://code.mamenesia.com/service/generate-function -H "Content-Type: application/json" -d '{"prompt":"debounce a function, with JSDoc"}'
# → 402: send 1 USDC to 0xc7e77CF4Bd5F7f1307d5846b1dbFcf0812FC0A46 on Base, then:
curl -X POST https://code.mamenesia.com/service/generate-function -H "Content-Type: application/json" -H "X-Payment: 0xabc...txhash" -d '{"prompt":"debounce a function, with JSDoc"}'
/**
* Debounce a function call.
* @param {Function} fn - function to debounce
* @param {number} ms - delay in milliseconds
* @returns {Function} debounced fn with .cancel()
*/
export function debounce(fn, ms = 250) {
let t;
function debounced(...args) {
clearTimeout(t);
t = setTimeout(() => fn.apply(this, args), ms);
}
debounced.cancel = () => clearTimeout(t);
return debounced;
}
// refactor-code returns notes up top // Changed: replaced manual loop with .reduce(), // removed mutable accumulator, added JSDoc. /** Sum numbers in an array. */ export const sum = (arr) => (arr ?? []).reduce((a, b) => a + b, 0);
Send USDC on Base (chainId 8453) to this address. The agent verifies the on-chain transfer before delivering code.
Common questions about the service, payments, and the x402 standard.
x402 is an open payment standard built on HTTP 402 Payment Required. It lets HTTP servers charge for resources using crypto (USDC on Base) without API keys or sign-ups.
Payments are made in USDC on the Base network (chainId 8453), the official Circle USDC contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.
Send the exact USDC amount to the agent wallet on Base, copy the transaction hash, then re-send your request with the header X-Payment: <tx-hash>.
Code is generated by glm-5.2 via OpenAgentic, with automatic fallback to kimi-k2.7-code, glm-5.1, and glm-5 for reliability.
Failed generations return HTTP 500 with refund_eligible: true. Contact the operator for a manual refund to your wallet.