{
    "info": {
        "_postman_id": "61bd6d12a73204a9ac2fc50be2540209",
        "name": "Hifisys AI Page Builder API",
        "description": "High-conversion website architecture API that generates semantic page sections, hero banners, and service copy.\n\nOfficial REST API Postman Collection for Hifisys Enterprise Platform. Managed dynamically.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Authentication & Health",
            "item": [
                {
                    "name": "Verify API Key Authentication",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/generate-page",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "generate-page"
                            ]
                        },
                        "description": "Validates that your API key is active, properly provisioned, and has appropriate scopes."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success field\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData).to.be.an(\"object\");",
                                    "    pm.expect(jsonData).to.have.property(\"success\");",
                                    "});",
                                    "pm.test(\"Headers contain quota or rate limit info\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "name": "Full Page Generation",
            "item": [
                {
                    "name": "Generate Page - Prompt Only (JSON)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"prompt\": \"High-converting FinTech SaaS landing page with dark gradient hero, ROI calculator, and pricing matrix.\",\n    \"base_theme\": \"modern_dark\",\n    \"output_format\": \"full_package\",\n    \"responsive\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/generate-page",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "generate-page"
                            ]
                        },
                        "description": "Generates complete responsive page layouts from textual creative prompts."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                },
                {
                    "name": "Generate Page - Prompt + Screenshot (Multipart)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "prompt",
                                    "value": "Build a luxury real estate page inspired by the attached mockup visual layout.",
                                    "type": "text"
                                },
                                {
                                    "key": "base_theme",
                                    "value": "hifisys_default",
                                    "type": "text"
                                },
                                {
                                    "key": "output_format",
                                    "value": "full_package",
                                    "type": "text"
                                },
                                {
                                    "key": "references[]",
                                    "type": "file",
                                    "src": "",
                                    "description": "Select a UI mockup (PNG/JPG/WebP/SVG)"
                                }
                            ]
                        },
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/generate-page",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "generate-page"
                            ]
                        },
                        "description": "Ingests a design screenshot and aligns synthesized component cards to visual structure."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                },
                {
                    "name": "Generate Page - Prompt + HTML Reference",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "prompt",
                                    "value": "Create a partner agency portal using the attached navigation header markup.",
                                    "type": "text"
                                },
                                {
                                    "key": "base_theme",
                                    "value": "corporate",
                                    "type": "text"
                                },
                                {
                                    "key": "references[]",
                                    "type": "file",
                                    "src": "",
                                    "description": "Select an HTML template file (.html)"
                                }
                            ]
                        },
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/generate-page",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "generate-page"
                            ]
                        },
                        "description": "Extracts DOM hierarchy and classes from uploaded HTML source."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                },
                {
                    "name": "Generate Page - Prompt + CSS Reference",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "prompt",
                                    "value": "Design an e-commerce hero aligning strictly with the attached brand CSS rules.",
                                    "type": "text"
                                },
                                {
                                    "key": "base_theme",
                                    "value": "minimal_light",
                                    "type": "text"
                                },
                                {
                                    "key": "references[]",
                                    "type": "file",
                                    "src": "",
                                    "description": "Select a CSS stylesheet (.css)"
                                }
                            ]
                        },
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/generate-page",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "generate-page"
                            ]
                        },
                        "description": "Extracts brand typography and color palette from attached CSS stylesheet."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                },
                {
                    "name": "Generate Page - Multimodal Package (Image + Code + URL)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "prompt",
                                    "value": "Architect an enterprise product launch page with dark glassmorphism effects.",
                                    "type": "text"
                                },
                                {
                                    "key": "base_theme",
                                    "value": "modern_dark",
                                    "type": "text"
                                },
                                {
                                    "key": "reference_url",
                                    "value": "https://hifisys.com",
                                    "type": "text"
                                },
                                {
                                    "key": "references[]",
                                    "type": "file",
                                    "src": "",
                                    "description": "Upload screenshot mockup (.png)"
                                },
                                {
                                    "key": "references[]",
                                    "type": "file",
                                    "src": "",
                                    "description": "Upload template or zip archive (.zip)"
                                }
                            ]
                        },
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/generate-page",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "generate-page"
                            ]
                        },
                        "description": "High-fidelity multimodal generation executing 5-level priority conflict resolution."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "name": "Modular Sections",
            "item": [
                {
                    "name": "Generate Section Component",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"section_type\": \"pricing_table\",\n    \"style\": \"dark_glassmorphism\",\n    \"items\": [\n        {\n            \"title\": \"Starter\",\n            \"price\": \"$29/mo\",\n            \"features\": [\n                \"5 Projects\",\n                \"10GB Storage\"\n            ]\n        },\n        {\n            \"title\": \"Business\",\n            \"price\": \"$99/mo\",\n            \"features\": [\n                \"Unlimited Projects\",\n                \"1TB Storage\"\n            ]\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/generate-section",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "generate-section"
                            ]
                        },
                        "description": "Generates individual modular components (hero, testimonial carousel, pricing card)."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "name": "HTML Sanitization & Validator",
            "item": [
                {
                    "name": "Clean & Standardize HTML",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"raw_html\": \"<div class=\\\"banner\\\"><script>alert(1);</script><p>Clean marketing content</p></div>\",\n    \"strip_scripts\": true,\n    \"format_tailwind\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        },
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/page-builder/clean-html",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "page-builder",
                                "clean-html"
                            ]
                        },
                        "description": "Strips unsafe scripts, validates nesting, and formats elements."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "variable": [
        {
            "key": "base_url",
            "value": "https://hifisys.com",
            "type": "string"
        },
        {
            "key": "api_key",
            "value": "YOUR_API_KEY",
            "type": "string"
        },
        {
            "key": "product_slug",
            "value": "ai-page-builder-api",
            "type": "string"
        },
        {
            "key": "api_version",
            "value": "v1",
            "type": "string"
        }
    ]
}