{"uid":"cap_uNBg0GatFTFKYaNBKnOag","slug":"x-pay-text-rewrite-api-a9cff849","name":"X Pay Text Rewrite API","description":"AI rewrite of input text","url":"https://www.api-xpay.com/x402/rewrite?utm_source=zero.xyz","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"},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"queryParams":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"asset":"USDC","network":"base","success":true,"rewritten":"Create this text sound better."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"10","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":"$10/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"10","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"10","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SjgNc3gISSeao2RPibLFA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"10","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Rewrites and improves submitted text using AI, paid per-request via x402 USDC on Base.","exampleAgentPrompt":"Rewrite this text to sound more polished and professional using the X Pay text rewrite API: 'our product is good and people like it a lot and you should buy it today'.","exampleUseCases":[{"title":"Polishing a product description","prompt":"Take this rough product blurb and rewrite it so it sounds more compelling and professional: 'this gadget is cool and it charges your phone fast and everyone loves it'."},{"title":"Improving a customer email draft","prompt":"Rewrite this draft email to a client so it sounds cleaner and more formal: 'hey just wanted to check if you got our invoice we sent it last week and need payment soon thanks'."},{"title":"Enhancing social media copy","prompt":"Make this social media post sound more engaging and natural: 'we have a new thing launching soon it is going to be great please follow us for updates'."}],"resultDescription":"Returns a JSON object containing a 'rewritten' field with the improved version of the submitted text, along with 'success' boolean, 'asset' (USDC), and 'network' (base) fields confirming the payment was processed on Base via USDC.","failureModes":["Payment not received or insufficient USDC balance — 402 error returned","Missing required fields (type, method, bodyType, body) — validation error","Invalid bodyType enum value — request rejected","Empty or malformed body object — unclear rewrite output","Network congestion on Base causing payment settlement delay"],"whenToPreferThis":"Choose this endpoint when you need lightweight, pay-per-use text rewriting without a subscription, especially in autonomous agent workflows that already handle x402/USDC micropayments on Base. Ideal when you want to avoid API key management and pay only for what you use.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T02:21:07.003Z","isFirstParty":false,"canonicalSlug":"x-pay-text-rewrite-api-a9cff849"}