# Delx Commerce — Path Extension Extractor

> Delx Commerce — Path Extension Extractor is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Extracts the file extension and basename from a given file path string

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/path-ext?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-path-extension-extractor-8f2f217a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NWwUJuDUuiuy7eqbHTs7K

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-commerce-path-extension-extractor-8f2f217a -d '<json body>'
```

Example prompt: What is the file extension and basename for the path 'uploads/2024/b.PNG'?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call utility to parse file extensions and basenames from path strings without managing any infrastructure or signup. It is ideal for agent pipelines that need to classify or route files by type on a per-call basis, with verifiable delivery and exact micro-pricing in USDC via x402.

## Known failure modes

- Missing or empty 'path' field returns an error
- Path with no extension returns has_extension: false and empty extension
- Malformed JSON input may return a 400-level error
- Network or payment failure (x402 USDC on Base/Solana) may prevent call completion

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

A JSON object containing the schema identifier ('delx/util-path-ext/v1'), the basename of the file (e.g. 'b.PNG'), the extracted extension in lowercase (e.g. 'png'), and a boolean indicating whether the path has an extension at all.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "path": {
   "type": "string",
   "description": "Input field: path."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-path-ext/v1",
  "basename": "b.PNG",
  "extension": "png",
  "has_extension": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-path-extension-extractor-8f2f217a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
