# Agent Preflight APIs – Email HTML Validator

> Agent Preflight APIs – Email HTML Validator is a paid API for AI agents from email-preflight-api.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Deterministically validates email HTML for deliverability issues, clipping risk, and compatibility problems before an agent sends a campaign or transactional message.

## Facts

- Endpoint: POST https://email-preflight-api.vercel.app/api/preflight
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-preflight-apis-email-html-validator-fbca8b79
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_24U0xtD3SnDESJ6XwCg7d

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 agent-preflight-apis-email-html-validator-fbca8b79 -d '<json body>'
```

Example prompt: Before I send this email campaign, check the HTML for clipping risk, missing alt text, inline style issues, and any other compatibility problems — here's the HTML: '<html><body><h1>Hello!</h1></body></html>'.

## When to prefer this

Use this endpoint when an AI agent is about to send an email and needs a fast, deterministic, pre-send sanity check on raw HTML — specifically to catch Gmail clipping risk (>102KB), missing alt text, embedded scripts, bloated style blocks, or base64 images before they reach an inbox. Prefer this over manual review or full inbox-placement testing services when you need a cheap ($0.01), programmatic, no-side-effect check that runs inline in an agentic workflow.

## Known failure modes

- Malformed or non-HTML input may return validation errors or unexpected issue lists
- Very large HTML payloads may be rejected or return clipping risk as high
- Payment failure via x402 protocol results in a 402 response before analysis begins
- Dynamic merge tags and platform-injected footer content are not accounted for in byte size calculations
- Results reflect static source analysis only — actual inbox rendering may differ

## How this service works

Pre-action x402 payment checks and deterministic email HTML validation for AI agents.

## Output

Returns a JSON object with an 'ok' boolean, a list of detected issues, detailed metrics (link count, image count, inline style bytes, script block bytes, comment bytes, base64 image bytes, images without alt text), a clipping risk assessment (risk level, HTML byte size, headroom, threshold, percent of threshold), service name, version, and a limitations disclaimer. An empty issues array with ok:true means no problems were detected.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "maxLength": 512000,
   "minLength": 1,
   "description": "One complete email HTML source document, up to 512,000 UTF-8 bytes. Do not include subscriber data."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "issues": [],
  "metrics": {
   "links": 1,
   "images": 0,
   "commentBytes": 0,
   "styleBlockBytes": 0,
   "imagesWithoutAlt": 0,
   "inlineStyleBytes": 0,
   "scriptBlockBytes": 0,
   "embeddedBase64ImageBytes": 0
  },
  "service": "email-preflight",
  "version": "2026-07-31",
  "clipping": {
   "risk": "low",
   "htmlBytes": 88,
   "headroomBytes": 102312,
   "thresholdBytes": 102400,
   "percentOfThreshold": 0.1
  },
  "limitations": [
   "This is deterministic source analysis, not inbox-placement or rendering testing.",
   "Merge tags and platform-added footer content can change final message size.",
   "A missing issue does not guarantee compatibility with every email client."
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-preflight-apis-email-html-validator-fbca8b79/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from email-preflight-api.vercel.app](https://www.zero.xyz/host/email-preflight-api.vercel.app/llms.txt)
