{"uid":"cap_0ImqSoc1xpK14sdofeLwz","slug":"delx-basename-28d8512d","name":"Delx Basename","description":"Extract basename from a URL or path-like string — 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 converted exter…","url":"https://api.delx.ai/api/v1/x402/basename","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"path":{"type":"string","description":"Input field: path."}}},"responseSchema":{"type":"json","example":{"empty":false,"schema":"delx/util-basename/v1","basename":"hash"}},"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_rJWhLO3SJxvh_AFFbFudl","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":"Extracts the basename (final path component) from a URL or file path string, returning a deterministic JSON result.","exampleAgentPrompt":"What's the basename of the path '/var/log/nginx/access.log'? Just give me the final filename component.","exampleUseCases":[{"title":"Filename from absolute file path","prompt":"I have the path '/home/user/documents/reports/q4_summary.pdf' — can you pull out just the filename at the end?"},{"title":"Last segment of a URL","prompt":"Given the URL 'https://cdn.example.com/assets/images/hero-banner.png', what is the basename — just the final part after the last slash?"},{"title":"Clean up log file paths in a pipeline","prompt":"I'm processing a list of log file paths like '/var/log/app/error.log' and I need to extract just the basename of each one to label my dashboard entries. Can you get the basename for '/var/log/app/error.log'?"}],"resultDescription":"A deterministic JSON object containing the extracted basename — the final component of the input path or URL after the last path separator — with no retained state or side effects.","failureModes":["Empty or missing 'path' input field returns an error or empty result","Input with no path separator may return the entire string as the basename","Malformed or non-string input may cause a validation error","Ambiguous trailing slashes may result in an empty basename"],"whenToPreferThis":"Choose this endpoint when you need a simple, cheap, stateless basename extraction from a path or URL string within an agent pipeline. Ideal for preflight data normalization, log processing, file labeling, or any workflow where you need to isolate the final path segment without spinning up a full local runtime or writing custom string logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:30.269Z","isFirstParty":false}