{"uid":"cap_zV-0rbB5hgTremg8711DW","slug":"delx-ensure-suffix-9e9c78b9","name":"Delx Ensure Suffix","description":"Ensure a string ends with a required suffix without duplication — first-party local utility for agent preflight and proven micro-utils expansion. Returns deterministic machine-readable JSON for $0.001 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, no web search, no live RPC, and no mediagen. Results are advisory; the caller owns authorization, budgets, and production controls. Sibling of Delx routes that already…","url":"https://api.delx.ai/api/v1/x402/ensure-suffix","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."},"suffix":{"type":"string","description":"Input field: suffix."}}},"responseSchema":{"type":"json","example":{"text":"report.json","schema":"delx/util-ensure-suffix/v1","suffix":".json","already_present":false}},"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_5JCc1QkgH8Yf-1W574y25","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":"Ensures a string ends with a specified suffix, appending it only if not already present, returning the normalized result as JSON","exampleAgentPrompt":"Make sure the string 'hello-world' ends with '-prod' — add the suffix only if it's not already there.","exampleUseCases":[{"title":"Normalize file extension in pipeline","prompt":"I have a filename 'report.csv' and I want to make sure it ends with '.csv' — if it already has that extension don't add it again."},{"title":"Ensure trailing slash on URL","prompt":"Can you make sure this URL 'https://api.example.com/v1' ends with a '/' without duplicating it if it's already there?"},{"title":"Enforce environment tag on resource name","prompt":"I need to guarantee the string 'my-service' ends with '-staging' for my deployment pipeline — only append it if it's not already present."}],"resultDescription":"A JSON object containing the normalized string that is guaranteed to end with the requested suffix exactly once, with no duplication if the suffix was already present.","failureModes":["Missing 'text' or 'suffix' fields returns an error response","Empty suffix string may return the original text unchanged","Payment failure or insufficient USDC balance via x402 blocks execution","Malformed JSON input returns a 400-level error"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, stateless, idempotent micro-utility to normalize string suffixes during agent preflight checks, pipeline normalization steps, or data validation flows — particularly when you want a machine-readable JSON result and no side effects. Ideal for ensuring file extensions, URL trailing slashes, or naming convention suffixes are present without duplication.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:17.743Z","isFirstParty":false}