{"uid":"cap_hKT9-4KGbpoCOqlD6ZP4V","slug":"pennyrail-text-normalize-whitespace-c620ec64","name":"PennyRail Text Normalize Whitespace","description":"Machine-readable settlement service","url":"https://pennyrail.vercel.app/api/p/nano/text.normalize-whitespace--clean-whitespace","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mmuZXXIdiN6vV0pPkqiWw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Normalizes and cleans whitespace in a given text string, removing extra spaces, tabs, and line breaks","exampleAgentPrompt":"Can you clean up the whitespace in this text for me? It has a bunch of extra spaces and irregular spacing: 'Hello,   world!  This   is   a   test.  '","exampleUseCases":[{"title":"Sanitize user-submitted form input","prompt":"I'm getting messy form submissions with tons of extra spaces and tabs — can you normalize all the whitespace in this string before I store it: '  John   Doe   ,   New   York  '?"},{"title":"Preprocess text before NLP pipeline","prompt":"Before I run sentiment analysis, I need to clean this scraped article snippet — it's full of extra line breaks and double spaces. Can you normalize the whitespace: 'The market   rose sharply\n\n  today  amid  strong  earnings.'?"},{"title":"Fix copy-paste formatting issues","prompt":"I copied some text out of a PDF and it's got weird spacing everywhere. Can you clean it up so it reads normally: 'Annual   Report   2024  —  Financial   Summary  Q1  through  Q4.'?"}],"resultDescription":"Returns a JSON object containing the cleaned, whitespace-normalized version of the input string, with extra spaces collapsed, leading/trailing whitespace removed, and irregular spacing standardized.","failureModes":["Missing required 'input' field returns a validation error","Non-string input may cause a type error or unexpected behavior","Payment failure via x402 protocol returns HTTP 402 before processing begins","Very large input strings may time out or be truncated"],"whenToPreferThis":"Use this endpoint when you need a lightweight, pay-per-call text whitespace normalization step in a pipeline without spinning up your own string processing logic. Best suited for sporadic or low-volume calls where a $0.001 micro-payment per call is acceptable. Prefer this over local regex-based solutions when operating in a serverless agent environment that routes through x402-enabled micropayment infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T07:21:52.498Z","isFirstParty":false}