Skip to content
clonesite.ai
Menu

Clone API · v1

Clone any website with one API call.

POST a URL, get back clean, editable source - a React + Tailwind project, not a screenshot. Built for agents and back-end automation, no browser to babysit.

x-api-key · 5 credits / clone · signed webhooks · 60 req/min

POST /api/v1/clone-requests
curl -X POST https://clonesite.ai/api/v1/clone-requests \
-H "x-api-key: cs_live_..." \
-H "Idempotency-Key: req_8273" \
-H "Content-Type: application/json" \
-d '{ "sourceUrl": "https://linear.app",
"prompt": "Clone as editable React." }'
202 Accepted
{
"id": "api_req_abc123",
"status": "queued",
"templateSlug": "linear-a1b2c3",
"statusUrl": "/api/v1/clone-requests/api_req_abc123"
}

How it works

From safe test to live source

01

Create a key

Mint one key in /developers and hand it to your agent. A human does this once - that's the whole human job.

x-api-key: cs_live_...
02

Test the flow

First run preflight and a free test-run with your live key, including the same webhook handler you will use in production.

POST /api/v1/clone-requests/test-runs
03

Run it live

Create the live request, poll the status or catch clone.ready, preview the result, then download the editable source as a ZIP.

POST /api/v1/clone-requests

Async by design

Clones run in the background and finish in minutes to a few hours. Poll the status endpoint, or let a signed webhook tell you the moment it's ready.

clone.ready · clone.failed

Fair, per-clone pricing

Five credits per clone - automatically refunded if a clone fails. Source downloads are billed once, separately. No subscription, no minimums.

5 credits / clone · auto-refund

Made for agents, not browsers

One x-api-key header, free preflight/test-run endpoints, and a self-describing openapi.json. Point any agent or backend at it - no SDK, no MCP server, no headless browser.

clonesite.ai/openapi.json

Preflight & test runs

Spend nothing until you're sure

Before the first live clone, dry-run the exact same payload. Preflight validates your key, permission, payload, credits, and webhook setup without creating a request, queuing a job, or moving a single credit. Then a free test-run rehearses the whole loop end to end.

  • Preflight returns canCreate and wouldChargeCredits - no request, no job, no charge
  • Test-runs create a free test request (mode: test) with real signed webhooks
  • Poll, verify webhooks, and pull a fixture source ZIP - same shapes as live, 0 credits
POST /api/v1/clone-requests/preflight
curl -X POST https://clonesite.ai/api/v1/clone-requests/preflight \
-H "x-api-key: cs_live_..." \
-H "Content-Type: application/json" \
-d '{ "sourceUrl": "https://linear.app", ... }'
200 OK · no charge
{
"canCreate": true,
"wouldChargeCredits": 5,
"wouldCreateCloneRequest": false
}
free test run
curl -X POST https://clonesite.ai/api/v1/clone-requests/test-runs \
-H "x-api-key: cs_live_..." \
-H "Idempotency-Key: test_8273" \
-H "Content-Type: application/json" \
-d '{ ..., "scenario": "ready" }'
# 202 · mode: test · 0 credits
# when ready: POST /source-downloads
# returns a fixture ZIP · 0 credits

Webhooks

Know the instant a clone is ready

We POST a signed event to your callback URL the moment a clone finishes - HMAC-SHA256 over the timestamp and raw body, retried with backoff until you acknowledge it. Verify it in three lines.

  • HMAC-SHA256 signature on every delivery
  • Automatic retries with exponential backoff
  • HTTPS-only callbacks, no redirects, no private hosts
POST your callback URL
X-Clonesite-Timestamp: 1781946000
X-Clonesite-Signature: v1=hex(hmac_sha256(...))
{ "event": "clone.ready",
"cloneRequestId": "api_req_abc123",
"templateSlug": "linear-a1b2c3",
"sourceZip": { "available": true, "creditCost": 100 }
}
verify
const sig = hmacSha256(secret, `${ts}.${body}`)
if (sig !== header) return reject(401)

Use cases

What teams build on it

Ship a clone this site feature

Wrap the API behind your own product and let your users turn any URL into editable code.

Bulk-clone for migration and analysis

Turn a list of URLs into React + Tailwind source for teardowns, audits, or re-platforming.

Agent-driven cloning

Give a coding agent a key and let it clone, edit, and ship - hands-off, end to end.

Pay only when it works

5 credits / clone · 100 credits first source unlock · 60 req/min

See pricing

FAQ

Questions, answered

How long does a clone take?

Most finish within minutes; complex sites can take up to a few hours. It's fully async - you get a webhook the moment it's ready.

What do I get back?

Clean, editable source as a downloadable ZIP - a React + Tailwind project you own, not a screenshot or a hosted page.

How am I billed?

5 credits per clone, automatically refunded if it fails. Downloading the source ZIP costs 100 credits, once per clone.

Do I need an SDK or an MCP server?

No. It's plain REST with an x-api-key header. Point your agent at openapi.json and it can call everything - no SDK, no MCP server required.

Are webhooks secure?

Yes - every event is signed with HMAC-SHA256 and retried with backoff until your endpoint acknowledges it. Callbacks are HTTPS-only.

What are the rate limits?

60 requests per minute per key. Need more headroom for a launch? Get in touch.

Can I test without spending credits?

Yes. Preflight validates your key, payload, and credits without creating anything. A free test-run rehearses the whole flow - it reaches ready and fires signed webhooks, then the same source-download endpoint returns a fixture ZIP for 0 credits.

Give your agent a key. It does the rest.

Create an API key in seconds. You only pay when a clone succeeds.

clonesite.ai/developers