curl does: one GET, no JavaScript. A client-rendered single-page app answers that request with an empty shell — a root <div> and a script tag — so every agent that lands on your site reads nothing. Agentify solves half of this on its own: when it converts a JavaScript-rendered page, it renders the page in a headless browser first, so the conversion carries your real content.
The other half is serving that markdown from your domain. A SPA on a CDN — Cloudflare Pages, Vercel, Netlify, S3 behind CloudFront — has no server to mount the SDK middleware in. The fix is an edge function in front of the SPA that implements the same contract: detect agent traffic, serve Agentify markdown, and fall through to the app on everything else, including any Agentify failure. The snippets below are that function for the three common hosts.
You need an API key with the
agentify:convert scope, minted in the dashboard under Settings → API keys (the Agentify group’s Convert toggle). Add it to your host as the secret ZEROCLICK_AGENTIFY_KEY. The edge function needs no signing secret — it verifies nothing, so the standalone SDK helpers are all it uses.Deploy the edge function
Each snippet useswithAgentify from @zeroclickai/sellers — the SDK is web-native, so it runs unchanged in edge runtimes — with a one-line client that supplies the key. withAgentify handles the whole contract: GET-only, detection over Accept and User-Agent, forwarded cache headers plus Vary, and fall-through to your app on any failure.
Verify
If conversion answers 422 content_too_thin
The error means the page yielded too little readable content even after rendering: the content appears only after user interaction, sits behind a bot wall, or never reaches the DOM at all. Two fixes, in order of preference:
- Prerender or server-render your marketing pages. Most SPA frameworks can emit static HTML for public pages at build time. That helps every raw-text reader, not just Agentify.
- Serve the content in the initial HTML. Agentify converts what a fetch (or a headless render of it) can see; content that only exists after a click cannot be converted.
Next steps
SDK middleware
The same contract as drop-in middleware, when you do have a server.
REST quickstart
The underlying endpoint: request, response anatomy, and errors.