Site Converter (Site-to-Code)
Site Converter turns a live web page into clean, editable HTML. Divinci
screenshots the URL server-side and a vision model regenerates it as a
self-contained document (Tailwind, plain CSS, or Bootstrap) — real images are
cropped from the capture and hosted for you. Give it a sitemap.xml and it
converts every page, stitching the navigation between them.
It’s the same feature across every surface: the dashboard, the CLI, the REST API, MCP, and the Divinci agent.
From the dashboard
Section titled “From the dashboard”Open a workspace → Data Sources → Site Converter. Paste a URL, pick an
output stack under Advanced (default Tailwind), optionally toggle
Multi-page and give a sitemap, then Convert. Each job shows a live
status (queued → screenshotting → generating → done); when it’s done you get
a sandboxed preview, a Download, and thumbnails of the extracted assets. The
page is findable from unified search (“Site Converter”, “convert website”,
“squarespace”).
From the CLI
Section titled “From the CLI”# Single page → clean HTMLdivinci site export https://your-site.squarespace.com --out index.html
# A specific page + stackdivinci site export https://example.com/about --stack html_css --out about.html
# Whole site from a sitemap → one file per pagedivinci site export https://example.com --sitemap https://example.com/sitemap.xml --out-dir ./site
# Fire-and-forget: print the jobId and exitdivinci site export https://example.com --no-wait# → poll later:divinci site get <jobId>From the Server SDK
Section titled “From the Server SDK”import { createServerClient } from "@divinci-ai/server";
const divinci = createServerClient({ apiKey: process.env.DIVINCI_API_KEY });
// Submit + poll to completionconst job = await divinci.siteToCode.createAndWait(whitelabelId, "https://example.com", { stack: "html_tailwind",});console.log(job.status, job.html?.length, "bytes");
// Or manage the job yourselfconst queued = await divinci.siteToCode.create(whitelabelId, "https://example.com");const latest = await divinci.siteToCode.get(whitelabelId, queued._id);const history = await divinci.siteToCode.list(whitelabelId);From MCP
Section titled “From MCP”The MCP server exposes site_export and site_get (scopes release:write /
release:read) — see the Tool Catalog.
Ask the Divinci agent
Section titled “Ask the Divinci agent”You can just ask the in-app assistant: “Convert https://my-site.com to clean HTML.” The agent starts the job for you and can report when it’s done.
The REST API
Section titled “The REST API”All surfaces call the same whitelabel-scoped endpoints (admin / editConfig):
| Method | Path | Purpose |
|---|---|---|
POST | /white-label/:wl/site-to-code | Submit a job ({ url, stack?, sitemapUrl? }) → 202 + job |
GET | /white-label/:wl/site-to-code | List this workspace’s jobs (History) |
GET | /white-label/:wl/site-to-code/:jobId | Poll one job |
GET | /white-label/:wl/site-to-code/config | Current per-job price (for cost disclosure) |
See the SiteToCodeJob type reference for the full job shape.