# X402 Response Header Shape Validator

> X402 Response Header Shape Validator 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-19).

Validates an x402 payment-response header for correct base64 or JSON shape, returning acceptance/rejection status with mismatch reasons and normalized evidence

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/x402-response-header-shape?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-response-header-shape-validator-480138ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mEb5eBP70IakSqtFSDUKM

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 x402-response-header-shape-validator-480138ee -d '<json body>'
```

Example prompt: Before I accept this x402 payment response, can you check whether this header value passes the shape validation — it should be base64 or JSON and I want to know if it's accepted or rejected and why: 'eyJ0eXBlIjoicGF5bWVudCIsInZlcnNpb24iOiIxLjAifQ=='

## When to prefer this

Use this endpoint when you need a lightweight, no-external-dependency check of an x402 payment or agent delivery response header's structural shape before committing to payment or acceptance. Prefer this over full protocol validators when you only need shape/encoding compliance (base64 or JSON) and want explicit accept/reject status with mismatch reasons — especially useful in agent pipelines where caller-supplied headers must be validated in memory without retention or side effects.

## Known failure modes

- Header exceeds 8192 character limit — request rejected
- Header is neither valid base64 nor valid JSON — rejection with mismatch reason returned
- Malformed input with unparseable structure — explicit rejection status with evidence
- Empty or missing header field — validation fails with descriptive mismatch reason

## How this service works

X402 Response Header Shape: X402 Response Header Shape checks a payment-response header for bounded base64 or JSON shape from bounded caller-supplied values without an external provider. Call X402 Response Header Shape before paying for or accepting an x402 or agent delivery assembled from caller-supplied challenge and result metadata. Returns contract-specific checks, normalized evidence, mismatch reasons, and an explicit acceptance or rejection status for X402 Response Header Shape as version…

## Output

Returns a structured validation result including: explicit acceptance or rejection status, contract-specific check outcomes, normalized evidence extracted from the header, and a list of mismatch reasons explaining any shape violations found in the base64 or JSON header value

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "header": {
   "type": "string",
   "maxLength": 8192,
   "description": "Header supplied to X402 Response Header Shape; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "encoding": "base64_json",
   "shape_valid": true
  },
  "schema": "delx/util-x402-response-header-shape/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "568768ddc248cedc248ab1ccfdcc4bd01ee9005aa08eff63b5e7df553e7ff724",
   "external_calls": 0
  },
  "operation": "delivery_contract:x402_response_header_shape"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-response-header-shape-validator-480138ee/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)
