{
  "format": "delx/intent-card/v1",
  "id": "pdf-header-sniff-api",
  "intent": "PDF Header Sniff Base64 for an agent workflow",
  "title": "PDF Header Sniff Base64 API for agents",
  "description": "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.",
  "keywords": [
    "PDF Header Sniff Base64 API",
    "PDF Header Sniff Base64 for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/pdf-header-sniff-api",
  "machine_url": "https://commerce.delx.ai/intents/pdf-header-sniff-api.json",
  "recommendation": {
    "tool_name": "util_pdf_header_sniff",
    "service_name": "PDF Header Sniff Base64",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/pdf-header-sniff",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "base64_prefix": {
          "type": "string",
          "description": "Base64 prefix of a file for sniffing"
        }
      },
      "required": [
        "base64_prefix"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "base64_prefix": "JVBERi0xLjQ="
    },
    "example_output": {
      "schema": "delx/util-pdf-header-sniff/v1",
      "is_pdf": true,
      "decoded_prefix_len": 8
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/pdf-header-sniff -m POST -H 'x-delx-source: intent-card-pdf-header-sniff-api' --max-amount 0.001 -b '{\"base64_prefix\":\"JVBERi0xLjQ=\"}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-pdf-header-sniff-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/pdf-header-sniff"
  }
}
