API Reference
Templates
Templates are curated, ready-to-use app designs. List all available templates, inspect a specific one by slug, or instantiate a template into a new project in your account.
GET
/api/v1/templatesList all publicly available app design templates. No authentication required.
- firstFrameHtml contains the HTML of the first screen — useful for rendering thumbnail previews.
- firstFrameHtml may be null for templates with no frames.
Response
{ "templates": [ { "id": "proj_tpl_fitness01", "name": "Fitness Tracker", "tag": "Health", "slug": "fitness-tracker", "description": "A 5-screen fitness tracking app with home, workout log, progress charts, profile, and settings.", "screens": 5, "firstFrameHtml": "<!DOCTYPE html>..." }, { "id": "proj_tpl_banking01", "name": "Mobile Banking", "tag": "Finance", "slug": "mobile-banking", "description": "Clean banking UI with dashboard, transactions, transfer, and cards screens.", "screens": 4, "firstFrameHtml": null } ]}GET
/api/v1/templates/:slugFetch a single template by its slug, including all frame HTML. No authentication required.
- Returns 404 if the slug does not match any published template.
- Use the frames array to render individual screens in iframes before deciding to instantiate.
Response
{ "template": { "id": "proj_tpl_fitness01", "name": "Fitness Tracker", "tag": "Health", "slug": "fitness-tracker", "description": "A 5-screen fitness tracking app...", "screens": 5, "createdAt": "2026-01-15T08:00:00Z", "frames": [ { "id": "frm_home_01", "label": "Home", "html": "<!DOCTYPE html>..." }, { "id": "frm_workout_01", "label": "Workout Log", "html": "<!DOCTYPE html>..." } ] }}POST
/api/v1/templates/use🔑 Auth requiredInstantiate a template into a new project in the authenticated user's account. All frames are deep-copied — changes to the new project do not affect the original template.
- The returned id is the newly created project ID. Open it at /project/{id} in the editor.
- Frame positions (left/top) and theme associations are preserved from the original template.
- Returns 404 if the templateId does not match a published template.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | ID of the template to instantiate (use the id field from the list or detail endpoints). |
Request body
{ "templateId": "proj_tpl_fitness01"}Response
{ "id": "proj_newxyz789"}