# Delx Commerce Payload Size Check

> Delx Commerce Payload Size Check 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).

Checks the byte and character size of a JSON payload against configurable hard and soft size limits, returning size metrics and truncation recommendations.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/payload-size-check?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-payload-size-check-7ca1e383
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GFkEgi--9CJXEO7kozo8e

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-payload-size-check-7ca1e383 -d '<json body>'
```

Example prompt: Check if this JSON object fits within a soft limit of 8192 bytes and a hard limit of 65536 bytes — tell me the exact byte count and whether I need to truncate it.

## When to prefer this

Use this endpoint when you need a fast, cheap, trustless utility check on payload size — especially within automated agent pipelines where you want to guard against oversized data before forwarding to a downstream API. Ideal when you need both byte and character counts and a built-in truncation recommendation in one call, without setting up your own size-checking logic.

## Known failure modes

- Missing or malformed payload object returns a validation error
- Non-integer limit values may cause a type error
- Extremely large payloads may time out or be rejected before measurement
- Payment failure via x402 protocol results in 402 response before processing

## How this service works

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

## Output

Returns the byte count, character count, a schema identifier, an overall status ('ok'), boolean flags indicating whether the payload is within the hard and soft limits, the limit values used, and a boolean recommendation on whether to truncate the payload.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "payload": {
   "type": "object",
   "description": "Input field: payload."
  },
  "hard_limit_bytes": {
   "type": "integer",
   "description": "Input field: hard limit bytes."
  },
  "soft_limit_bytes": {
   "type": "integer",
   "description": "Input field: soft limit bytes."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 17,
  "chars": 17,
  "schema": "delx/util-payload-size-check/v1",
  "status": "ok",
  "within_hard": true,
  "within_soft": true,
  "hard_limit_bytes": 65536,
  "soft_limit_bytes": 8192,
  "recommend_truncate": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-payload-size-check-7ca1e383/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)
