# Delx Commerce String Pad API

> Delx Commerce String Pad API 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).

Pads a string to a fixed width by filling with a specified character on a given side (left or right)

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/string-pad?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-string-pad-api-dd96b4d1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GWyjtBbJvhjsQ2TIg-h83

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-string-pad-api-dd96b4d1 -d '<json body>'
```

Example prompt: Left-pad the number 42 with zeros so it's exactly 5 characters wide.

## When to prefer this

Use this endpoint when an AI agent needs to format strings or numbers to a fixed width (e.g. zero-padded IDs, aligned columns, fixed-length codes) without deploying custom code. Ideal for agentic pipelines that need verifiable, pay-per-use string utilities via x402/USDC with no signup or API key management.

## Known failure modes

- Missing required fields (text or width) return a validation error
- Invalid side value (not 'left' or 'right') may cause a bad request
- Width smaller than the input text length may return the original string unmodified
- Payment failure via x402 protocol blocks the request
- Non-integer width value causes schema validation error

## How this service works

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

## Output

Returns a JSON object containing the padded string (text field showing the result), along with the original parameters (fill character, side, width) and a schema identifier (delx/util-string-pad/v1) for verification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fill": {
   "type": "string",
   "description": "Input field: fill."
  },
  "side": {
   "type": "string",
   "description": "Input field: side."
  },
  "text": {
   "type": "string",
   "description": "Input field: text."
  },
  "width": {
   "type": "integer",
   "description": "Input field: width."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fill": "0",
  "side": "left",
  "text": "00042",
  "width": 5,
  "schema": "delx/util-string-pad/v1"
 }
}
```

## More

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