{"uid":"cap_J6SCIQkGcgac8kguPdTuF","slug":"delx-commerce-normalize-whitespace-api-d6552f33","name":"Delx Commerce — Normalize Whitespace API","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/normalize-whitespace?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","bodyType","body"],"properties":{"body":{"type":"object","additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{}},"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_Lm0d-vamYvRMaqzwuJDQZ","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 whitespace in text content by collapsing, trimming, or standardizing spaces, tabs, and newlines within a JSON body","exampleAgentPrompt":"Can you normalize all the whitespace in this text — collapse double spaces, trim leading and trailing spaces, and clean up any inconsistent spacing: 'Hello   world,   this  is   a   test  string  with   irregular   spaces'?","exampleUseCases":[{"title":"Cleaning scraped web content","prompt":"I just scraped some HTML text from a webpage and it's full of double spaces and weird tabs. Can you normalize the whitespace so it reads cleanly as a single-spaced text?"},{"title":"Preprocessing text for NLP pipeline","prompt":"Before I send this user-submitted form text to my language model, can you clean up all the inconsistent spacing and trim any leading or trailing whitespace from each field?"},{"title":"Standardizing data before storage","prompt":"I'm about to store these product descriptions in my database but they have all sorts of extra spaces and irregular line breaks — can you normalize the whitespace across all the text fields in this JSON object?"}],"resultDescription":"Returns a JSON object where the text content has been normalized: extra whitespace collapsed to single spaces, leading and trailing whitespace trimmed, and inconsistent spacing standardized throughout the provided body fields.","failureModes":["Missing required 'input' or 'output' fields returns a 400 validation error","Unsupported bodyType (not 'json', 'form-data', or 'text') returns a validation error","Non-POST/PUT/PATCH method in input causes rejection","Malformed JSON body cannot be parsed and returns an error","Payment not completed via x402 protocol results in 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call whitespace normalization step with no signup overhead, especially in agent pipelines handling user-submitted text, scraped content, or LLM outputs that need consistent spacing before downstream processing or storage. Prefer over self-hosted solutions when you want verifiable, metered execution at $0.001 per call via USDC on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:03.955Z","isFirstParty":false,"canonicalSlug":"delx-commerce-normalize-whitespace-api-d6552f33"}