{"uid":"cap_F-BqqIR-ReKEbtxQX3Auv","slug":"delx-commerce-ensure-prefix-0d369f06","name":"Delx Commerce — Ensure Prefix","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/ensure-prefix?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."},"prefix":{"type":"string","description":"Input field: prefix."}}},"responseSchema":{"type":"json","example":{"text":"https://api.delx.ai","prefix":"https://","schema":"delx/util-ensure-prefix/v1","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_KtioK4hv6luGvZM9_xM4_","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 given string starts with a specified prefix, adding it if absent and reporting whether it was already present","exampleAgentPrompt":"Make sure the text 'api.delx.ai' starts with 'https://' — add it if it's missing and tell me if it was already there.","exampleUseCases":[{"title":"Normalize URL before API call","prompt":"I have this URL 'example.com/endpoint' and I need to guarantee it starts with 'https://' before I pass it to another service — can you add the prefix if it's missing?"},{"title":"Ensure file path prefix consistency","prompt":"I'm processing a list of paths and I need each one to start with '/data/' — take the string 'reports/sales.csv' and make sure it has that prefix."},{"title":"Idempotent prefix check for pipeline","prompt":"In my data pipeline I need to confirm the string 'mailto:user@example.com' already starts with 'mailto:' — check it and tell me if the prefix was already present or if it was added."}],"resultDescription":"Returns a JSON object containing: the final normalized text (with the prefix guaranteed), the prefix that was checked, the schema identifier ('delx/util-ensure-prefix/v1'), and a boolean 'already_present' indicating whether the prefix was already in the original input string.","failureModes":["Missing required 'text' or 'prefix' field returns a validation error","Empty string inputs may produce unexpected normalization results","Payment failure via x402 (insufficient USDC balance) blocks the request","Network timeout if the Delx Commerce endpoint is temporarily unavailable"],"whenToPreferThis":"Use this endpoint when an agent needs a guaranteed-idempotent, verifiable, pay-per-result string prefix normalization step — especially for URL canonicalization or path normalization inside automated pipelines where correctness must be confirmed programmatically. It is preferable over local string logic when auditability, verifiable delivery, or pipeline consistency across distributed agents is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:05.139Z","isFirstParty":false,"canonicalSlug":"delx-commerce-ensure-prefix-0d369f06"}