POST /api/skill/a11y-auditBundled execution of the WCAG accessibility audit workflow — Run a deterministic WCAG 2.x audit of an HTML page from a string and a fg/bg color pair. Checks language attribute (3.1.1), document title (2.4.2), heading order (1.3.1), link-text presence (2.4.4), color contrast (1.4.3), and reading grade level (3.1.5 AAA). Seven pure-CPU tools, no headless browser needed — the canonical accessibility-first-pass workflow done as a single round-trip of tool calls. One x402 payment runs 7 underlying tools (html-meta, html-strip, html-links, html-select, color-contrast, readability, text-stats); partial-success per step.
| Field | Type | Description |
|---|---|---|
html * | string | the HTML document to audit (full document or fragment, as a string) |
foreground * | string | the canonical body text color as a hex string (e.g. '#333333') |
background * | string | the canonical body background color as a hex string (e.g. '#ffffff') |
{
"pack": "a11y-audit",
"args": {
"html": "<!doctype html><html lang=\"en\"><head><title>Quarterly Earnings Brief</title><meta name=\"viewport\" content=\"width=device-width\"></head><body><h1>Q4 Earnings Summary</h1><h3>Revenue</h3><p>Total revenue was $4.2M, up 18% year-over-year. The increase was driven primarily by enterprise SaaS contracts and a one-time licensing arrangement.</p><h2>Costs</h2><p>Operating costs grew 12% to $2.9M. Headcount expansion in engineering accounted for the majority of the increase.</p><p>Read the <a href=\"/full-report\">full report</a> or <a href=\"https://investor.example.com\">visit investor relations</a>. Click <a href=\"/contact\">here</a> for questions.</p></body></html>",
"foreground": "#333333",
"background": "#ffffff"
},
"steps": [
{
"slug": "html-meta",
"ok": true,
"result": {}
},
{
"slug": "html-strip",
"ok": true,
"result": {}
},
{
"slug": "html-links",
"ok": true,
"result": {}
},
{
"slug": "html-select",
"ok": true,
"result": {}
},
{
"slug": "color-contrast",
"ok": true,
"result": {}
},
{
"slug": "readability",
"ok": true,
"result": {}
},
{
"slug": "text-stats",
"ok": true,
"result": {}
}
],
"summary": "7/7 steps succeeded"
}
curl -i -X POST https://agent402.tools/api/skill/a11y-audit \
-H "Content-Type: application/json" \
-d '{"html":"<!doctype html><html lang=\"en\"><head><title>Quarterly Earnings Brief</title><meta name=\"viewport\" content=\"width=device-width\"></head><body><h1>Q4 Earnings Summary</h1><h3>Revenue</h3><p>Total revenue was $4.2M, up 18% year-over-year. The increase was driven primarily by enterprise SaaS contracts and a one-time licensing arrangement.</p><h2>Costs</h2><p>Operating costs grew 12% to $2.9M. Headcount expansion in engineering accounted for the majority of the increase.</p><p>Read the <a href=\"/full-report\">full report</a> or <a href=\"https://investor.example.com\">visit investor relations</a>. Click <a href=\"/contact\">here</a> for questions.</p></body></html>","foreground":"#333333","background":"#ffffff"}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/skill/a11y-audit", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"html": "<!doctype html><html lang=\"en\"><head><title>Quarterly Earnings Brief</title><meta name=\"viewport\" content=\"width=device-width\"></head><body><h1>Q4 Earnings Summary</h1><h3>Revenue</h3><p>Total revenue was $4.2M, up 18% year-over-year. The increase was driven primarily by enterprise SaaS contracts and a one-time licensing arrangement.</p><h2>Costs</h2><p>Operating costs grew 12% to $2.9M. Headcount expansion in engineering accounted for the majority of the increase.</p><p>Read the <a href=\"/full-report\">full report</a> or <a href=\"https://investor.example.com\">visit investor relations</a>. Click <a href=\"/contact\">here</a> for questions.</p></body></html>",
"foreground": "#333333",
"background": "#ffffff"
}),
});
This is a pure-CPU tool, so an agent without a wallet can pay with proof-of-work instead of USDC: fetch a challenge, solve the sha256 puzzle (16 leading zero bits — a fraction of a second of CPU, no money, no AI tokens), and resend with the X-Pow-Solution header.
import { createHash } from "node:crypto";
const lz = (b) => { let t = 0; for (const x of b) { if (!x) { t += 8; continue; } t += Math.clz32(x) - 24; break; } return t; };
const c = await (await fetch("https://agent402.tools/api/pow/challenge?slug=skill-a11y-audit")).json();
let n = 0;
while (lz(createHash("sha256").update(c.challenge + ":" + n).digest()) < c.difficulty) n++;
await fetch("https://agent402.tools/api/skill/a11y-audit", { method: "POST", headers: { "X-Pow-Solution": c.token + ":" + n, "Content-Type": "application/json" }, body: JSON.stringify({"html":"Quarterly Earnings Brief Q4 Earnings Summary
Revenue
Total revenue was $4.2M, up 18% year-over-year. The increase was driven primarily by enterprise SaaS contracts and a one-time licensing arrangement.
Costs
Operating costs grew 12% to $2.9M. Headcount expansion in engineering accounted for the majority of the increase.
Read the full report or visit investor relations. Click here for questions.
","foreground":"#333333","background":"#ffffff"}) });
POST /api/skill/security-auditBundled execution of the Security audit workflow — Enumerate a domain's external attack surface in one workflow: certs, …
POST /api/skill/email-deliverabilityBundled execution of the Email deliverability workflow — Diagnose why a domain's email lands in spam: SPF posture, DMARC…
POST /api/skill/financial-researchBundled execution of the Financial research workflow — Pull SEC filings, real-time quotes, historical prices, and macro …