AI Page Builder API Reference

High-conversion website architecture API that generates semantic page sections, hero banners, and service copy.

Developer Assets v2.1.0 Postman & Web Console

Test AI Page Builder API Online or in Postman

Import our verified Postman Collection with pre-configured requests, rate-limit assertion scripts, and environment variables ({{base_url}}, {{api_key}}), or test live using your customer credentials.

POST /api/v1/ai/page-builder/generate-page
Scope: page:generate

Generates production-grade semantic HTML, modular CSS, interactive JavaScript, and Laravel Blade layouts. Accepts creative prompt-only requests (application/json) or multi-modal reference files (multipart/form-data) such as UI screenshots, HTML templates, CSS sheets, or archive packages.

5-Level Structural Fidelity & Priority Resolution

The engine resolves styling and structural conflicts by enforcing strict priority levels:

  1. P1 (Highest): User Prompt Directives (explicit layout rules, content text, brand guidelines)
  2. P2: Uploaded UI Designs (screenshots, Figma mockups, visual section flow)
  3. P3: Uploaded HTML/CSS/JS Source Code (reusable classes, custom widgets)
  4. P4: Selected Base Theme (hifisys_default, modern_dark, minimal_light, corporate)
  5. P5: AI Defaults (fallback color harmony, responsive mobile breakpoints)

Request Parameters (JSON or Multipart Form)

Field Type Required Description & Accepted Values
prompt string Required Detailed description of the desired page layout, sections, typography, components, and brand styling (min 5, max 10,000 characters).
base_theme string Optional Pre-configured styling system. Values: hifisys_default (Navy & Gold), modern_dark (Slate & Violet), minimal_light (Clean Modern White), or corporate (Enterprise Steel Blue). Default: hifisys_default.
output_format string Optional Desired output package structure. Values: html (standard standalone document), blade (Laravel Blade template), or full_package (HTML+CSS+JS bundled archive). Default: html.
responsive boolean Optional Whether to enforce fluid responsive breakpoints for Mobile (390px), Tablet (768px), and Desktop (1280px+). Default: true.
references[] file[] Optional Up to 5 uploaded reference files (max 10MB each). Supported formats: .png, .jpg, .webp, .svg, .html, .css, .js, .zip. Extracted tokens override base theme tokens.
reference_html string Optional Pasted raw HTML code or existing web template to improve, modernise, or restyle.
reference_text string Optional Written design guidelines, brand palette hex codes, or specific UI component requirements.
reference_url string/url Optional Public URL of a benchmark website or design layout used as architectural inspiration.
Live Visual Studio Interactive Playground

Test AI Page Builder Visually

Experience the real-time AI Page Builder Studio with multi-modal reference uploads, live sandboxed DOM preview, responsive viewport switchers (Desktop, Tablet 768px, Mobile 390px), ZIP downloads, and generation history.

Example Multi-Modal Request
# Multi-Modal Request with Design Reference Upload (multipart/form-data)
curl -X POST "https://hifisys.com/api/v1/ai/page-builder/generate-page" \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "prompt=High-converting FinTech SaaS landing page with dark hero, pricing matrix, and interactive ROI calculator" \
  -F "base_theme=modern_dark" \
  -F "output_format=full_package" \
  -F "references[]=@/path/to/hero_mockup.png" \
  -F "references[]=@/path/to/existing_navbar.html"

Verified 200 OK Response Schema

{
  "success": true,
  "data": {
    "generation_id": "gen_6702e5a1b32",
    "prompt": "High-converting FinTech SaaS landing page with dark hero...",
    "base_theme": "modern_dark",
    "output_format": "full_package",
    "page_html": "<!DOCTYPE html><html lang='en'><head>...</head><body>...</body></html>",
    "page_css": ":root { --primary: #0f172a; --accent: #7c3aed; } ...",
    "page_js": "document.addEventListener('DOMContentLoaded', () => { ... });",
    "page_blade": "@extends('layouts.app')\n@section('content')\n<main>...</main>\n@endsection",
    "design_spec": {
      "layout_archetype": "modern_saas",
      "color_palette": { "primary": "#0f172a", "accent": "#7c3aed" },
      "detected_sections": ["Hero Section", "Feature Grid", "ROI Calculator", "Pricing Matrix", "FAQ Accordion"]
    },
    "tokens_used": 1420,
    "latency_seconds": 1.15
  }
}
POST /api/v1/ai/page-builder/clean-html
Scope: page:section

Sanitizes raw markup, strips malicious scripts, and validates element hierarchy.

HTTP Status Codes & Error Handling

RFC 9110 Compliant

The AI Page Builder API returns standard HTTP status codes along with a JSON body containing an error code, user-friendly message, and detailed validation context where applicable.

Status Error Name Cause & Meaning Developer Resolution
400 Bad Request Malformed JSON payload or invalid query parameters. Verify syntax and confirm content-type is application/json or multipart/form-data.
401 Unauthorized Missing or invalid X-API-Key header. Pass a valid API key generated from your Developer Portal.
403 Forbidden Missing active entitlement or subscription for AI Page Builder API. Subscribe to the AI Page Builder product plan in your Customer Dashboard.
422 Unprocessable Content Field validation failed (e.g. prompt empty, file >10MB, unsupported format). Inspect the errors object in JSON response for field-specific guidance.
429 Too Many Requests Rate limit (per-minute) or monthly invocation quota exceeded. Implement exponential backoff or request a quota upgrade from your Developer Console.
500 Internal Server Error AI synthesis engine error or upstream timeout. Retry request after 2 seconds. Contact engineering if the error persists.

Postman Integration & Environment Setup

Download Collection
1 Import Collection

Download our pre-configured Postman v2.1 JSON collection and import into Postman or Insomnia workspace.

2 Set Variables

Configure baseUrl as https://hifisys.com and apiKey with your client secret token.

3 Execute & Inspect

Run sample requests with form-data or JSON payloads and inspect raw HTML, CSS, JS, and Blade output.


Chat on WhatsApp