{"uid":"cap_RgQZbWP0hB7CiamUXLmOY","slug":"delx-commerce-basename-extractor-api-5a710879","name":"Delx Commerce — Basename Extractor 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/basename?utm_source=zero.xyz","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_Bwc_RcDtmg9Rx5vEqRt4p","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 given file or URL path string","exampleAgentPrompt":"What's the basename of the path '/usr/local/share/docs/readme.txt'? Just give me the final filename segment.","exampleUseCases":[{"title":"Extract filename from upload path","prompt":"I have a file path like '/var/uploads/2024/january/report_final.pdf' — can you pull out just the filename at the end?"},{"title":"Parse basename from API response URL","prompt":"This API response gave me a full path '/api/v3/resources/images/avatar_user123.png' — what's the basename of that path?"},{"title":"Normalize asset name from build artifact path","prompt":"Our CI pipeline outputs paths like '/build/dist/assets/bundle.min.js' — extract the basename so I can use it as the asset label."}],"resultDescription":"Returns a JSON object containing an 'empty' boolean indicating whether the basename is empty, a 'schema' field ('delx/util-basename/v1'), and a 'basename' string with the extracted final path component (e.g. 'readme.txt' from '/usr/local/docs/readme.txt').","failureModes":["Empty or missing 'path' input returns {empty: true, basename: ''}","Malformed JSON request body returns a 4xx error","Payment failure via x402 protocol blocks the request","Path with only directory separators may return empty basename","Network timeout if upstream service is unavailable"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call basename extraction with no signup, no API key management, and verifiable delivery via x402 micropayments on Base or Solana. Ideal for AI agents that need to process paths on-demand at $0.001 USDC per call without committing to a subscription. Prefer alternatives if you need bulk batch processing or if you already have a local string utility available.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:56:04.245Z","isFirstParty":false,"canonicalSlug":"delx-commerce-basename-extractor-api-5a710879"}