DELXCOMMERCE Live contract

Agent operations math · agent-ops-math

PDF Header Sniff Base64

Sniff PDF magic and approximate size from base64 prefix. Call when rejecting non-PDF uploads before heavy OCR. Returns is_pdf and decoded_prefix_len as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

x402agentslocal-firstmicro-usdcpay-per-callexpansion-100agent-ops-math

One-command purchase

Run it from an agent.

No account or API key. AgentCash reads the 402 challenge, pays no more than the declared cap, retries the request and returns the result.

npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/pdf-header-sniff -m POST -H 'x-delx-source: product-page' --max-amount 0.001 -b '{"base64_prefix":"JVBERi0xLjQ="}'
InputPOST /api/v1/x402/pdf-header-sniff
{
  "base64_prefix": "JVBERi0xLjQ="
}
Delivered resultapplication/json
{
  "schema": "delx/util-pdf-header-sniff/v1",
  "is_pdf": true,
  "decoded_prefix_len": 8
}

Machine-readable evidence

Inspect before paying.