Design Engine API
https://ai.extendify.com/api/design
Generate full WordPress website previews from a text description.
Typical flow
1. Client calls GET /api/design?description=A+bakery+in+Paris&language=fr_FR
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
401 Unauthorized— missing, invalid, or revoked token
Endpoints
GET /api/design?description=...&language=...
Starts a new design preview generation.
| Param | Required | Default | Description |
|---|---|---|---|
description |
Yes | — | What the site is about (e.g. "A bakery in Paris") |
language |
No | en_US |
WordPress locale code (see supported languages below) |
Response 200
{ "id": "abc123" }
Errors
400— Missing description or unsupported language (returns{ error, supported })429— Rate limited
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 |
- Shows an animated loader while generation is in progress
- Streams the final HTML once complete
- Times out after ~5 minutes
- Posts
messageevents to the parent window (works cross-origin)
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>...",
"error": null
}
status is complete when the preview is ready, error on failure, or
anything else while generation is in progress.
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 |