# Delx Commerce Text Truncate API

> Delx Commerce Text Truncate 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).

Truncates text to a specified length or limit via a pay-per-call HTTP API using USDC micropayments on Base or Solana.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/text-truncate?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-text-truncate-api-c2a94145
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wRE_Xf9lT4ou8wuV1fcfd

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-text-truncate-api-c2a94145 -d '<json body>'
```

Example prompt: Truncate this product description to 150 characters: 'The Delx Commerce platform offers pay-per-result APIs for AI agents with no signup required, exact pricing, verifiable delivery, and USDC payments on Base and Solana.'

## When to prefer this

Choose this endpoint when you need a lightweight, no-signup text truncation utility that charges only per successful call via USDC micropayment. It is ideal for AI agent workflows that require verifiable, pay-per-result processing without API key management or subscription overhead. Prefer it over self-hosted string truncation when auditability of the operation and crypto-native payment rails (Base or Solana) matter to the workflow.

## Known failure modes

- Missing required 'input' or 'output' fields returns a validation error
- Incorrect bodyType enum value causes request parsing failure
- Empty or null body text may return an empty truncated result or error
- Payment failure via x402 protocol prevents execution and returns 402 Payment Required
- Malformed JSON body causes a 400-level parse error
- Overly large input body may exceed payload limits and return 413

## 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 truncated version of the submitted text, cut to the specified length or limit defined in the request body. The response conforms to the output example schema declared at call time.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

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