{"uid":"cap_9Dkj6X0cL5TYqR9nobSsz","slug":"delx-commerce-dedent-text-api-38e6d160","name":"Delx Commerce — Dedent Text 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/dedent-text?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."}}},"responseSchema":{"type":"json","example":{"text":"  a\n  b\nc","schema":"delx/util-dedent-text/v1","stripped":2}},"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_cQ3lgt-GO18fNtww56xjE","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":"Removes common leading whitespace (dedents) from a multi-line text string, returning the normalized text and the number of spaces stripped.","exampleAgentPrompt":"Can you dedent this text block for me — it has 2 spaces of common indentation on every line that I want removed: '  hello\\n  world\\n  foo'?","exampleUseCases":[{"title":"Clean indented code snippet for output","prompt":"I have this code block that got indented when I copied it out of a function body — can you remove the common leading whitespace so it looks clean? Here's the text: '    def greet():\\n        print(\"hello\")'"},{"title":"Normalize pasted document paragraph","prompt":"This paragraph was pasted from a document editor and every line starts with 4 spaces. Can you strip the common indentation so it's properly left-aligned? Text: '    The quick brown fox\\n    jumps over the lazy dog\\n    every single day.'"},{"title":"Prepare template text for downstream processing","prompt":"Before I send this template to the formatter, I need to dedent it — the whole block has 3 spaces of common indentation. Can you strip that for me? Here it is: '   Dear user,\\n   Welcome aboard.\\n   Regards, Team'"}],"resultDescription":"Returns a JSON object containing the dedented text string, the number of leading spaces that were stripped (stripped field), and a schema identifier (delx/util-dedent-text/v1) confirming the operation type.","failureModes":["Missing or empty 'text' field in request body — likely returns a 400 or validation error","Text with inconsistent indentation where no common prefix exists — result may be unchanged or strip fewer spaces than expected","Very large text strings may exceed payload limits","Payment failure via x402 protocol if USDC balance is insufficient or wallet is misconfigured"],"whenToPreferThis":"Choose this endpoint when you need a reliable, pay-per-use, no-signup text dedenting utility with verifiable delivery. Ideal for AI agents that occasionally need to normalize indented text blocks without integrating a full text-processing library or managing dependencies. Particularly useful in agent workflows processing code snippets, pasted documents, or template strings that carry incidental indentation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:07.690Z","isFirstParty":false,"canonicalSlug":"delx-commerce-dedent-text-api-38e6d160"}