Skip to content

Site Converter (Site-to-Code)

Copy page

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.

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”).

Terminal window
# Single page → clean HTML
divinci site export https://your-site.squarespace.com --out index.html
# A specific page + stack
divinci site export https://example.com/about --stack html_css --out about.html
# Whole site from a sitemap → one file per page
divinci site export https://example.com --sitemap https://example.com/sitemap.xml --out-dir ./site
# Fire-and-forget: print the jobId and exit
divinci site export https://example.com --no-wait
# → poll later:
divinci site get <jobId>
import { createServerClient } from "@divinci-ai/server";
const divinci = createServerClient({ apiKey: process.env.DIVINCI_API_KEY });
// Submit + poll to completion
const job = await divinci.siteToCode.createAndWait(whitelabelId, "https://example.com", {
stack: "html_tailwind",
});
console.log(job.status, job.html?.length, "bytes");
// Or manage the job yourself
const 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);

The MCP server exposes site_export and site_get (scopes release:write / release:read) — see the Tool Catalog.

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.

All surfaces call the same whitelabel-scoped endpoints (admin / editConfig):

MethodPathPurpose
POST/white-label/:wl/site-to-codeSubmit a job ({ url, stack?, sitemapUrl? }) → 202 + job
GET/white-label/:wl/site-to-codeList this workspace’s jobs (History)
GET/white-label/:wl/site-to-code/:jobIdPoll one job
GET/white-label/:wl/site-to-code/configCurrent per-job price (for cost disclosure)

See the SiteToCodeJob type reference for the full job shape.