# Delx Basename

> Delx Basename is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Extracts the basename (final path component) from a URL or file path string, returning a deterministic JSON result.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/basename
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-basename-28d8512d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0ImqSoc1xpK14sdofeLwz

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-basename-28d8512d -d '<json body>'
```

Example prompt: What's the basename of the path '/var/log/nginx/access.log'? Just give me the final filename component.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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…

## Output

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.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "empty": false,
  "schema": "delx/util-basename/v1",
  "basename": "hash"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-basename-28d8512d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
