# Delx Cmp String

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

Lexicographically compares two strings and returns -1, 0, or 1 indicating their sort order relationship.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/cmp-str?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-cmp-string-d23efc59
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_enShj1cUN-6jWEMN-lPGs

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-cmp-string-d23efc59 -d '<json body>'
```

Example prompt: Compare the two strings 'apple' and 'banana' lexicographically and tell me which comes first — I need the cmp result (-1, 0, or 1).

## When to prefer this

Use this endpoint when an agent needs a deterministic, stateless, single-call string comparison with no setup, no credentials, and no side effects — particularly useful in agentic pipelines where sorting or branching on string keys is needed and the cost of $0.001 USDC per call is acceptable. It is simpler than writing inline comparison logic and avoids environment-specific locale issues.

## Known failure modes

- Missing required field 'a' or 'b' returns a 400 validation error
- Non-string inputs may cause type errors or unexpected results
- Payment failure or insufficient USDC balance returns a 402 error
- Network timeout returns a 5xx error with no comparison result

## How this service works

Compare two strings lexicographically (-1, 0, 1). Call when you sort or branch on agent string keys. Returns cmp result for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object containing a single integer comparison result: -1 if string a is lexicographically less than string b, 0 if they are equal, and 1 if a is greater than b.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cmp": 1,
  "schema": "delx/util-cmp-str/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-cmp-string-d23efc59/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)
