{"uid":"cap_o9QrtI1baL95pl2Ts8RKW","slug":"one-engine-whitespace-normalizer-f2e20e25","name":"ONE Engine Whitespace Normalizer","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v3/text-normalize/whitespace/t6?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text up to 50000 characters"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_96BxsJJ8i1Cg9gwhYu11G","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Normalizes whitespace in text strings up to 50,000 characters, collapsing irregular spacing into consistent formatting.","exampleAgentPrompt":"Can you normalize the whitespace in this text for me? It has a bunch of irregular spaces and double spaces that need to be cleaned up: 'Hello   world,   this  is   a   test   string  with   messy   spacing.'","exampleUseCases":[{"title":"Clean OCR-extracted document text","prompt":"I just extracted text from a scanned PDF using OCR and it's full of double spaces, random tabs, and weird gaps between words — can you normalize all the whitespace so it reads cleanly?"},{"title":"Preprocess user-submitted form input","prompt":"A user submitted a bio field on our form and it has a ton of extra spaces and line breaks scattered throughout. Can you clean up the whitespace so it looks consistent before we store it?"},{"title":"Fix spacing in scraped web content","prompt":"I scraped some article text from a website and the spacing is all over the place — multiple spaces between words, leading spaces on lines, etc. Please normalize the whitespace so it's clean and uniform."}],"resultDescription":"Returns a JSON object containing the whitespace-normalized version of the input text, with irregular spacing collapsed to standard single spaces and leading/trailing whitespace removed.","failureModes":["Text exceeds 50,000 character limit — request rejected","Empty or missing 'text' field — validation error","Payment not provided or insufficient — 402 response requiring x402 payment on Base","Malformed JSON body — 400 error","Network timeout on Cloudflare Workers edge"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call whitespace normalization step in an agent pipeline — especially when you want to avoid bundling heavy NLP libraries just for spacing cleanup. Ideal for preprocessing OCR output, user-submitted text, or scraped web content before feeding it into downstream models or databases. At $0.004 USDC per call it's cost-effective for high-volume text cleaning without infrastructure overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:54.606Z","isFirstParty":false,"canonicalSlug":"one-engine-whitespace-normalizer-f2e20e25"}