{"uid":"cap_OeBgeDTH7x_6UEjTvqjKz","slug":"delx-dedent-text-0aaf2248","name":"Delx Dedent Text","description":"Remove common leading whitespace from lines. Call when you normalize agent-held code fences or YAML blocks. Returns dedented text and stripped space count for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/dedent-text","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_2byrgE9vrXR1Oo7Xusy0V","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 from all lines of a text block and returns the dedented text along with the number of spaces stripped.","exampleAgentPrompt":"Can you dedent this YAML block for me and tell me how many spaces were stripped? It's been indented with 4 spaces on every line and I need it normalized before I pass it to the next step.","exampleUseCases":[{"title":"Normalize YAML block before parsing","prompt":"I have a YAML config snippet that came out of a template with 4 extra leading spaces on every line — can you remove that common indentation and tell me how many spaces were stripped so I can feed it to a YAML parser cleanly?"},{"title":"Clean up pasted code fence","prompt":"This code block was copied out of a nested markdown section and every line starts with 8 spaces. Can you dedent it so the leading whitespace is gone and return the clean version?"},{"title":"Fix over-indented Python docstring","prompt":"I've got a Python docstring where all the lines are indented by 3 spaces because of how it sits in the function — please strip that common leading whitespace from each line and let me know how much was removed."}],"resultDescription":"Returns the dedented text with common leading whitespace removed from all lines, plus an integer count indicating how many leading spaces were stripped per line.","failureModes":["Missing or empty 'text' field returns an error or no-op result","Text with inconsistent indentation may only strip the minimum common leading whitespace","Very large text payloads may be rejected or time out","Non-string input for 'text' field may cause a validation error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, stateless, single-call operation to strip common leading whitespace from a multiline string — especially for normalizing code fences, YAML blocks, or template output before further processing. Prefer it over implementing local dedent logic when operating in environments where you cannot ship utility libraries or want a consistent, auditable transformation with a known cost.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:02.219Z","isFirstParty":false}