API Reference
Backend API documentation
Sketch to Screen API (1.0.0)
Download OpenAPI specification:Download
API documentation for the backend services handling sketch-to-HTML generation, component variations, and real-time collaboration.
Generate Single Page Mockup
Uploads a single sketch image and converts it into HTML/CSS code.
Request Body schema: multipart/form-datarequired
| file required | string <binary> The sketch image file (PNG/JPG). Max size 10MB. |
| prompt | string Optional text prompt to guide the generation. |
Responses
Response samples
- 200
{- "html": "string"
}Generate Multiple Mockups
Uploads multiple sketch images to generate multiple HTML pages in parallel. Note: Files must be indexed (file_0, file_1, etc.).
Request Body schema: multipart/form-datarequired
| count required | integer [ 1 .. 20 ] Total number of files being uploaded (1-20). |
| file_0 | string <binary> First file upload. Pattern: file_{i} |
| name_0 | string Name for the first page. Pattern: name_{i} |
| id=0 | string ID for the first page. Pattern: id={i} |
Responses
Response samples
- 200
{- "results": [
- {
- "id": "string",
- "html": "string",
- "error": "string"
}
]
}Generate Component Variations
Generates design variations for a specific HTML element/component.
Request Body schema: application/jsonrequired
| element_html required | string The HTML code of the component to modify. |
| element_type | string Default: "component" Type of element (e.g., 'button', 'card'). |
| prompt | string Custom instructions for the variation (e.g., 'Make it darker'). |
| count | integer [ 1 .. 10 ] Default: 3 Number of variations to generate. |
Responses
Request samples
- Payload
{- "element_html": "string",
- "element_type": "component",
- "prompt": "string",
- "count": 3
}Response samples
- 200
{- "variations": [
- "string"
]
}