# Delx Ensure Suffix

> Delx Ensure Suffix 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).

Ensures a string ends with a specified suffix, appending it only if not already present, returning the normalized result as JSON

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/ensure-suffix
- 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-ensure-suffix-9e9c78b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zV-0rbB5hgTremg8711DW

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-ensure-suffix-9e9c78b9 -d '<json body>'
```

Example prompt: Make sure the string 'hello-world' ends with '-prod' — add the suffix only if it's not already there.

## When to prefer this

Choose this endpoint when you need a deterministic, stateless, idempotent micro-utility to normalize string suffixes during agent preflight checks, pipeline normalization steps, or data validation flows — particularly when you want a machine-readable JSON result and no side effects. Ideal for ensuring file extensions, URL trailing slashes, or naming convention suffixes are present without duplication.

## Known failure modes

- Missing 'text' or 'suffix' fields returns an error response
- Empty suffix string may return the original text unchanged
- Payment failure or insufficient USDC balance via x402 blocks execution
- Malformed JSON input returns a 400-level error

## How this service works

Ensure a string ends with a required suffix without duplication — 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…

## Output

A JSON object containing the normalized string that is guaranteed to end with the requested suffix exactly once, with no duplication if the suffix was already present.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "report.json",
  "schema": "delx/util-ensure-suffix/v1",
  "suffix": ".json",
  "already_present": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-ensure-suffix-9e9c78b9/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)
