Extendify API

https://ai.extendify.com/api/design

Generate full WordPress website previews from a text description, or by pointing the API at an existing site URL that will be scraped and redesigned.

Typical flow

1. Client calls GET /api/design?description=A+bakery+in+Paris&language=fr_FR
   (or GET /api/design?url=https://www.customer-site.com to redesign an existing site)
   with header: Authorization: Bearer YOUR_TOKEN
2. Gets back { "id": "abc123" }
3. Loads <iframe src="/api/design/abc123/iframe">
4. Iframe shows spinner, then streams final HTML when ready
5. Optionally poll GET /api/design/abc123 for structured data
6. Redirect user to WordPress: /wp-admin/?auto-launch=true&build-id=abc123

Authentication

All requests to GET /api/design require an authentication token sent as a Bearer header:

Authorization: Bearer YOUR_TOKEN

Getting a token: tokens are issued manually by the Extendify team. Reach out to us to get one for your integration.

The token identifies the partner and is used for usage tracking. Read endpoints (GET /api/design/{id}, GET /api/design/{id}/iframe) are unauthenticated — the build ID itself acts as the access credential.

Errors


Endpoints

GET /api/design?description=...&language=...

Starts a new design preview generation. Send either description or url.

Param Required Default Description
description Yes, unless url is set — What the site is about (e.g. "A bakery in Paris"). Optionally, specify what images should be used in the header or the entire website.
url Yes, unless description is set — An existing site URL to redesign (see Redesign below). http(s) only; private/internal hosts are rejected.
language No en_US WordPress locale code (see supported languages below)
view No hero hero returns just the header and hero section. full-page generates the entire homepage.
screenshot No false Return screenshots as PNGs of the finished preview. This results in a slower response time and consumes additional credit.
structure No — single-page or multi-page. Leave blank to let the AI decide.
onlyNewImages No false Redesign only. true skips the page's own photos and uses stock photos instead. The logo is still used.

A redesign always generates the entire homepage (so it is always a full-page preview); description and view are ignored when url is set.

Response 200

{ "id": "abc123" }

Errors

Generation runs asynchronously. Use the ID to poll status or load the iframe.


GET /api/design/{id}/iframe

Renders the preview as a streamable HTML page. Designed to be loaded in an <iframe>.

Param Required Default Description
loader-color No #9ca3af CSS color for the loading spinner

Parent window events — listen with window.addEventListener('message', handler):

event height Description
loading — Loader is showing, generation in progress
ready number Final HTML rendered, includes content height
resize number Content height changed (via ResizeObserver)
error — Generation failed
timeout — Generation timed out

All messages have { type: 'extendify-design-preview', event, height? }.


GET /api/design/{id}

Returns the current state of a design preview.

Response 200

{
	"id": "abc123",
	"status": "complete",
	"html": "<!DOCTYPE html>...",
	"screenshots": [
		{
			"slug": "home",
			"raw": "https://...",
			"regular": "https://...",
			"small": "https://...",
			"thumb": "https://..."
		}
	],
	"error": null
}

status is complete when the preview is ready, error on failure, or one of these in-flight values, in order:

starting, fetching-url, processing-logo, generating-profile, generating-content, generating-images, capturing-screenshot

fetching-url and processing-logo are only seen on a redesign, and processing-logo is skipped when the page has neither a logo nor images to use. capturing-screenshot is only seen when screenshot=true.

Errors

Error codes

A failed preview's last line in error is unexpected, followed by the underlying error. A redesign can also fail with one of the codes listed under Redesign below.

Soft failures are appended to the error field but the preview still completes:

Code Meaning
logo-fallback Redesign only. Logo couldn't be fetched/decoded/uploaded — preview fell back to a stock logo
color-fallback Redesign only. Brand color couldn't be read from the logo — palette chosen without a brand-color hint
scraped-image-fallback Redesign only. An image from the page couldn't be downloaded or read, or was too small — it's left out. One line per image
nav-extras-fallback Header extras (phone number, button or social icons) couldn't be chosen — the preview leaves them out
image-search-fallback Stock photo search failed — the preview may be missing images
image-search-empty Stock photo search returned no usable photos — the preview may be missing images
decide-images-fallback Redesign only. Placing the page's own photos failed — stock photos were used instead
palette-fallback The chosen color palette isn't available — another one was used
vibe-fallback The chosen visual style isn't available — the default style was used
white-logo-light-background Redesign only. The logo is white but no dark palette was available — it may be hard to see
screenshot-failed screenshot=true was set but capture failed — preview completes with screenshots: null

error may carry several lines — soft fallbacks plus, eventually, a hard error. Each line starts with its code so you can branch on it.

Screenshots

screenshots has one entry per page, each carrying the same PNG in four widths:

Size Width Typical weight
raw 1280px 280 KB – 1 MB
regular 1080px 100 – 270 KB
small 400px 20 – 55 KB
thumb 200px 8 – 20 KB

Important: every screenshot URL is signed and expires within approximately 30 minutes. We recommend downloading the image and hosting it yourself rather than hot-linking to it.

The response also includes additional fields consumed server-side by the WordPress redirect flow. Their shape is internal — don't rely on it.


WordPress redirect

Once the user is happy with the preview, redirect them to their WordPress admin to apply the design:

https://{user-site}/wp-admin/?auto-launch=true&build-id={id}
Param Description
auto-launch Must be true — triggers the Extendify launch flow on page load
build-id The design preview ID returned from /api/design

Supported languages

See extendify.com/documentation/supported-languages

Redesign

Send url instead of description to generate the preview from an existing site. Redesign must be enabled for your token; otherwise GET /api/design returns 403 url-input-not-permitted. Email Extendify to enable this feature for your token.

What we extract from a URL

We extract data like site title, logo, description, menu items, contact information, and more.

In the current version, only a single provided page URL is used to retrieve the information, and only data visible within the page render is used.

Failure modes

These all set status: "error" on the preview row and surface a code in the error field:

Code Meaning
url-unreachable The page couldn't be fetched: network failure, timeout, or a server error
url-blocked The URL was rejected when we tried to fetch it
url-missing-description Page scraped but no usable description was extracted (title/nav/logo may be present)
extract-failed The page's content couldn't be extracted: it came back empty, or extraction failed
unexpected Anything else; the message includes the underlying error

All codes in the error codes table above can appear on a redesign; those marked Redesign only never appear on a description preview.

Credit usage

Request Credits
Hero preview 1
Hero preview with screenshot 2
Full-page preview 2
Full-page preview with screenshot 3
Redesign (single page scrape) 5
Redesign with screenshot 6