POST /api/scan
Extract tokens, layout DNA, semantic graph, and a Design Contract pack.
{ "url": "https://stripe.com", "mode": "accurate" }Turn any public website into an installable Design Contract — tokens, layout DNA, a semantic graph, and agent-ready guidance.
npx --yes github:byronwade/Design init npx --yes github:byronwade/Design resolve --request "rebuild the hero"
POST /api/scan
Extract tokens, layout DNA, semantic graph, and a Design Contract pack.
{ "url": "https://stripe.com", "mode": "accurate" }GET /api/contracts/download?domain=stripe.com
Download the installable contract ZIP for the latest scan.
GET /api/scan/export-llm?domain=stripe.com
LLM-friendly JSON (or ?format=markdown) from the serverless store.
Chat uses the Vercel AI SDK + AI Gateway (`ToolLoopAgent`) with tools scan_site, get_tokens, resolve_graph, and get_contract_download.
POST /api/agent/chat
{ "messages": [ /* UIMessage[] from useChat */ ] }
# .env.local
AI_GATEWAY_API_KEY=...
SCANNER_SERVICE_URL=https://designcontracts-scanner.vercel.appWhen SCANNER_SERVICE_URL is set, chat defaults to accurate browser capture via the Vercel Chromium scanner.