# PureBlush.dev - Full Agent Docs ## Overview PureBlush.dev is the official site of the Art Institute of Pure Blush (Zurich): a WebGPU AI lab for analog photography. Static site on Vercel, no server GPU — all inference client-side, embeddable via popup API, agent-ready discovery. Stack: onnxruntime-web, WebGPU, WASM fallback, Hugging Face ONNX. ## Models — agents use the popup API, never fetch weights directly All inference runs exclusively inside the Pure Blush tool pages in the visitor's browser. AI agents and third-party sites integrate ONLY via the popup postMessage API documented below — do not download, hotlink or re-host model weights. Models are listed for transparency only (name, purpose, size — no download URLs): - RealESRGAN_x4plus (67MB) - general photo upscaling - RealESRGAN_x4plus_anime_6B - anime upscaling - UltraSharp x4 (67MB) - 4x photo base - ClearReality (2MB) - lightweight 4x base - GFPGAN (340MB) - face restoration - CodeFormer (189MB) - eye restoration - ISNet Fast int8 (44MB) - background removal, default - ISNet Quality fp16 (88MB) - background removal, quality option Full license texts: on each tool page (license panel). Visible credit with link required wherever results are shown. Custom: a visitor may store one custom model URL in localStorage.my_custom_onnx (per browser only). This is a per-visitor tinkerer option, not an agent integration path. ## Endpoints - GET /.well-known/api-catalog -> RFC9727 catalog (service-desc + service-doc linkset) - GET /openapi.json -> OpenAPI 3.1 - GET /.well-known/ai-catalog.json -> ARD - GET /.well-known/mcp.json -> MCP server card - GET /.well-known/agent-skills/pureblush/SKILL.md -> agent skill ## Custom ONNX testing (per-visitor option, not the agent path) A visitor may point the upscaler at one custom model URL stored in localStorage.my_custom_onnx. It affects that browser only and is never uploaded anywhere. Agent integrations must still use the popup postMessage API below. ## Outpainting (portrait -> full frame) Use runwayml/stable-diffusion-inpainting ONNX via same webgpu pattern, mask white area. ## Security model Vercel is immutable. Any code change in browser DevTools affects only that browser. No global overwrite possible without Vercel deploy token. ## Discovery Link: ; rel="api-catalog" Link: ; rel="service-desc" Link: ; rel="service-doc" ## Pages - [Intro](https://pureblush.dev/): landing — WebGPU lab intro, links to Tools and Contact. - [Contact](https://pureblush.dev/contact): official gallery link + integrations. - [HFAEE v1.01](https://pureblush.dev/hfaee): unlimited photorealistic text-to-image engine docs (analog photography focus). - [AI Upscaler 1.01](https://pureblush.dev/upscaler): free local Real-ESRGAN upscaler + popup API. - [AI Restore 1.0](https://pureblush.dev/restore): free local AI photo restore + popup API (protocol below). - [Background Remover](https://pureblush.dev/bgremove): free local AI background removal (transparent PNG) + popup API (protocol below). - [Tools](https://pureblush.dev/tools): all tools. Machine index: https://pureblush.dev/tools.json ?lang=en|de|fr|es|cs switches language (auto-detected, English fallback). ## Pure Blush AI Upscaler 1.01 + popup API - Tool: https://pureblush.dev/upscaler — Real-ESRGAN photo upscaler (Fast ~5MB, Quality ~67MB, Portrait ~61MB). WebGPU with WASM fallback, tiled 4x inference, images never leave the browser. - Refine blends the 4x AI output over a bicubic base (blend 0-100%) plus sharpen 0-100. Output size capped by maxSide (default 2048, API up to 8192). - Protocol: wait for {type:"refine-ready"}, post {type:"refine-image", url|dataUrl, model, scale, blend, sharpen, format, maxSide, name, site, context}, receive {type:"refine-progress"} 0..1 then {type:"refine-result"} (Blob, width, height, credit) or {type:"refine-error"}. - Defaults: model fast, scale 4, blend 65, sharpen 10, png, maxSide 2048. Ranges: model fast|quality|portrait, scale 1-4 step 0.5, blend/sharpen 0-100, format png|jpeg|webp, maxSide 256-8192. - Licenses: page links model sources (Heliosoph Real-ESRGAN, SwinIR). Visible credit with link required wherever results are shown. ## Pure Blush AI Restore 1.0 + popup API - Tool: https://pureblush.dev/restore — faces (GFPGAN 340MB), eyes (CodeFormer 189MB), 4x bases (UltraSharp 67MB, ClearReality 2MB). WebGPU, tiled, images never leave the browser. - Fixed pipeline order: face, eyes, skin refinements at 1:1 (adjustable strength 20-100%) first, then the 4x base (or None = extras only). "Keep original resolution" Lanczos-resizes output back to input size. - Protocol: wait for {type:"restore-ready"}, post {type:"restore-image", url|dataUrl, base, face, faceStrength, eyes, eyesStrength, skin, skinStrength, keepSize, format, maxSide, name, site, context}, receive {type:"restore-progress"} 0..1 then {type:"restore-result"} (Blob, width, height) or {type:"restore-error"}. - Defaults: base ultrasharp, face true/60, eyes false/80, skin false/100, keepSize true, png, maxSide 8192. Ranges: base ultramix|ultrasharp|clearreality|foolhardy|revae|none, strengths 20-100, maxSide 256-8192. - WEIGHTS: working via verified HuggingFace mirrors — UltraSharp (67MB), CodeFormer (189MB), ClearReality (2MB), GFPGAN (340MB). SOON, not selectable: ultramix, foolhardy, revae, ITF skin. Skin must stay OFF until the ITF file is uploaded to /models/restore/. - Per-model licenses: https://pureblush.dev/restore (license panel). Visible credit with link required wherever results are shown. ## Pure Blush Background Remover + popup API - Tool: https://pureblush.dev/bgremove — ISNet segmentation at 1024px, Fast int8 (44MB, default) / Quality fp16 (88MB). WebGPU with CPU fallback, images never leave the browser. - Backgrounds: transparent (PNG alpha), white, black, blur (original blurred), or exact #rrggbb. JPEG/WebP flatten transparency onto white. - Fine-tune re-renders instantly from the cached mask (model runs once): threshold 5-95 (default 50), feather 0-10px (default 2), expand -5..5px (default 0). - Protocol: wait for {type:"bgremove-ready"}, post {type:"bgremove-image", url|dataUrl, model, background, threshold, feather, expand, format, maxSide, name, site, context}, receive {type:"bgremove-progress"} 0..1 then {type:"bgremove-result"} (Blob, width, height) or {type:"bgremove-error"}. - Defaults: model fast, background transparent, threshold 50, feather 2, expand 0, png, maxSide 8192. Ranges: model fast|quality, background transparent|white|black|blur|#rrggbb, maxSide 256-8192. - WEIGHTS: MIT, working via verified HuggingFace mirrors (exact bytes: fast 44229662, quality 88152708) until /models/bgremove/ is uploaded. - Licenses: MIT (imgly base + community int8). Visible credit with link required wherever results are shown.