### Success Response Example Source: https://bareminimum.design/docs This is an example of a successful API response when generating an ASCII wireframe. ```json { "ascii": " ┌─────────────────┐ │ Login Form │ └─────────────────┘ " } ``` -------------------------------- ### Analyze UI Request Body Source: https://bareminimum.design/docs Example request body for the POST /agents/analyze endpoint to analyze a UI screenshot. ```json { "image_data": "base64...", "image_media_type": "image/png" } ``` -------------------------------- ### Analyze UI Response Source: https://bareminimum.design/docs Example response body for the POST /agents/analyze endpoint, containing analysis of a UI screenshot. ```json { "analysis": { "summary": "The layout has good structure but could improve visual hierarchy.", "issues": [ { "id": "issue_1", "category": "visual_hierarchy", "severity": "medium", "title": "Weak call-to-action", "description": "The primary button doesn't stand out enough.", "ascii_before": "[ Get Started ]", "ascii_after": "[ ▶ GET STARTED ]" } ], "strengths": ["Good use of whitespace", "Consistent typography"] } } ``` -------------------------------- ### Generate Wireframe Response Source: https://bareminimum.design/docs Example response body for the POST /agents/chat endpoint after successfully generating an ASCII wireframe. ```json { "ascii": " ┌──────────────────────────────────────┐ │ LOGIN │ ├──────────────────────────────────────┤ │ │ │ Email: [____________________] │ │ │ │ Password: [____________________] │ │ │ │ [ Sign In ] │ │ │ └──────────────────────────────────────┘ ", "spec": null, "clarification_needed": false, "clarification_options": null, "resolved_target": null } ``` -------------------------------- ### Error Response Example Source: https://bareminimum.design/docs This is an example of an API error response, specifically for rate limiting. ```json { "error": "rate_limit_exceeded", "message": "Rate limit exceeded. Retry after 60 seconds.", "status": 429, "request_id": "req_abc123", "details": { "retry_after": 60 } } ``` -------------------------------- ### Generate Wireframe using Python Source: https://bareminimum.design/docs Use this Python function to generate ASCII art wireframes by sending a message to the chat agent. Ensure the 'requests' library is installed. ```python import requests BASE_URL = "https://api.bareminimum.design/api" def generate_wireframe(message: str, aspect: str = "desktop") -> str: response = requests.post( f"{BASE_URL}/agents/chat", json={"message": message, "aspect_preset": aspect}, ) response.raise_for_status() return response.json()["ascii"] # Usage ascii_art = generate_wireframe("A settings page with toggles") print(ascii_art) ``` -------------------------------- ### Generate Component Spec Response Body Source: https://bareminimum.design/docs This is an example of the JSON response body when a ComponentSpec is successfully generated. ```json { "spec": { "...": "ComponentSpec tree" } } ``` -------------------------------- ### Generate Wireframe Request Body Source: https://bareminimum.design/docs Example request body for the POST /agents/chat endpoint to generate an ASCII wireframe from a text description. ```json { "message": "A login form with email and password fields", "aspect_preset": "desktop", "image_data": null, "image_media_type": null, "reference_ascii": null } ``` -------------------------------- ### Generate Variants Request Body Source: https://bareminimum.design/docs Example request body for the POST /agents/variants endpoint to generate multiple wireframe variants. ```json { "message": "A dashboard with analytics charts", "count": 3, "aspect_preset": "desktop" } ``` -------------------------------- ### Generate Variants Response Source: https://bareminimum.design/docs Example response body for the POST /agents/variants endpoint, containing a list of generated wireframe variants. ```json { "variants": [ { "ascii": " ┌─── DASHBOARD ───┐ │ ... ", "spec": null }, { "ascii": " ╔═══ DASHBOARD ═══╗ ║ ... ", "spec": null }, { "ascii": " ┏━━━ DASHBOARD ━━━┓ ┃ ... ", "spec": null } ], "failures": [] } ``` -------------------------------- ### Analyze UI Source: https://bareminimum.design/docs Analyze a UI screenshot to provide feedback on layout and visual hierarchy improvements. ```APIDOC ## POST /agents/analyze ### Description Analyze a UI screenshot to provide feedback on layout and visual hierarchy improvements. ### Method POST ### Endpoint /agents/analyze ### Parameters #### Request Body - **image_data** (string) - Required - Base64-encoded image - **image_media_type** (string) - Required - MIME type (e.g. "image/png") ### Request Example ```json { "image_data": "base64...", "image_media_type": "image/png" } ``` ### Response #### Success Response (200) - **analysis** (object) - Contains the analysis results. - **summary** (string) - A brief summary of the analysis. - **issues** (array) - A list of identified issues. - **id** (string) - Unique identifier for the issue. - **category** (string) - Category of the issue (e.g., "visual_hierarchy"). - **severity** (string) - Severity level (e.g., "medium"). - **title** (string) - Title of the issue. - **description** (string) - Detailed description of the issue. - **ascii_before** (string) - ASCII representation before suggested changes. - **ascii_after** (string) - ASCII representation after suggested changes. - **strengths** (array) - A list of identified strengths in the UI. #### Response Example ```json { "analysis": { "summary": "The layout has good structure but could improve visual hierarchy.", "issues": [ { "id": "issue_1", "category": "visual_hierarchy", "severity": "medium", "title": "Weak call-to-action", "description": "The primary button doesn't stand out enough.", "ascii_before": "[ Get Started ]", "ascii_after": "[ ▶ GET STARTED ]" } ], "strengths": ["Good use of whitespace", "Consistent typography"] } } ``` ``` -------------------------------- ### Generate Component Spec Source: https://bareminimum.design/docs Convert an ASCII wireframe into a structured ComponentSpec used for live preview rendering. ```APIDOC ## POST /agents/spec ### Description Convert an ASCII wireframe into a structured ComponentSpec used for live preview rendering. ### Method POST ### Endpoint /agents/spec ### Parameters #### Request Body - **ascii** (string) - Required - ASCII wireframe to convert (max 50,000 chars) ### Request Example ```json { "ascii": " ┌─────────┐\n │ [Save] │\n └─────────┘ " } ``` ### Response #### Success Response (200) - **spec** (object) - ComponentSpec tree #### Response Example ```json { "spec": { "...": "ComponentSpec tree" } } ``` ``` -------------------------------- ### Generate Wireframe Source: https://bareminimum.design/docs Generate an ASCII wireframe from a text description. You can also provide an optional reference image or existing ASCII to refine. ```APIDOC ## POST /agents/chat ### Description Generate an ASCII wireframe from a text description. You can also provide an optional reference image or existing ASCII to refine. ### Method POST ### Endpoint /agents/chat ### Parameters #### Request Body - **message** (string) - Required - Description of the UI to generate (max 10,000 chars) - **aspect_preset** (string) - Optional - "desktop" (default) or "mobile" - **image_data** (string) - Optional - Base64-encoded reference image (max 2MB) - **image_media_type** (string) - Optional - MIME type (required with image_data) - **reference_ascii** (string) - Optional - Existing ASCII to refine/modify ### Request Example ```json { "message": "A login form with email and password fields", "aspect_preset": "desktop", "image_data": null, "image_media_type": null, "reference_ascii": null } ``` ### Response #### Success Response (200) - **ascii** (string) - The generated ASCII wireframe. - **spec** (any) - Placeholder for potential structured data. - **clarification_needed** (boolean) - Indicates if the AI needs more information. - **clarification_options** (any) - Options for clarification if needed. - **resolved_target** (any) - Resolved target information. #### Response Example ```json { "ascii": "\n ┌──────────────────────────────────────┐\n │ LOGIN │\n ├──────────────────────────────────────┤\n │ │\n │ Email: [____________________] │\n │ │\n │ Password: [____________________] │\n │ │\n │ [ Sign In ] │\n │ │\n └──────────────────────────────────────┘\n ", "spec": null, "clarification_needed": false, "clarification_options": null, "resolved_target": null } ``` ``` -------------------------------- ### Generate Variants Source: https://bareminimum.design/docs Generate multiple wireframe variants with different styles based on a text description. ```APIDOC ## POST /agents/variants ### Description Generate multiple wireframe variants with different styles based on a text description. ### Method POST ### Endpoint /agents/variants ### Parameters #### Request Body - **message** (string) - Required - Description of the UI - **count** (integer) - Optional - Number of variants (1-5, default 3) - **aspect_preset** (string) - Optional - "desktop" or "mobile" - **image_data** (string) - Optional - Base64-encoded reference image - **image_media_type** (string) - Optional - MIME type (required with image_data) ### Request Example ```json { "message": "A dashboard with analytics charts", "count": 3, "aspect_preset": "desktop" } ``` ### Response #### Success Response (200) - **variants** (array) - An array of generated wireframe variants. - **ascii** (string) - The ASCII representation of the variant. - **spec** (any) - Placeholder for potential structured data. - **failures** (array) - An array of any failures encountered during generation. #### Response Example ```json { "variants": [ { "ascii": "\n ┌─── DASHBOARD ───┐\n │ ...\n ", "spec": null }, { "ascii": "\n ╔═══ DASHBOARD ═══╗\n ║ ...\n ", "spec": null }, { "ascii": "\n ┏━━━ DASHBOARD ━━━┓\n ┃ ...\n ", "spec": null } ], "failures": [] } ``` ``` -------------------------------- ### Generate Component Spec Request Body Source: https://bareminimum.design/docs This is the JSON request body format for converting an ASCII wireframe into a structured ComponentSpec. ```json { "ascii": " ┌─────────┐ │ [Save] │ └─────────┘ " } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.