API Reference
Export
Export your frames to Figma as native layers, or generate production-ready component code in React Native, Flutter, SwiftUI, or Jetpack Compose. Both endpoints consume credits.
POST
/api/v1/export-code🔑 Auth requiredGenerate production-ready component code from any HTML screen. Supports React Native (TSX), Flutter (Dart), SwiftUI (Swift), and Jetpack Compose (Kotlin).
- Generated code is pure UI — no navigation, state management, or API calls.
- Frameworks: react_native → TSX, flutter → Dart, swiftui → Swift, jetpack_compose → Kotlin.
- Pair with the Image → HTML API: convert a screenshot to HTML, then pass that HTML here.
- Returns 402 if the account has no remaining credits or requires a plan upgrade.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
html | string | Yes | Full HTML of the screen to convert. Pass the html returned by the Image → HTML API directly. |
framework | "react_native" | "flutter" | "swiftui" | "jetpack_compose" | Yes | Target framework for code generation. |
label | string | No | Screen name used for the output fileName. Defaults to "Screen". |
Request body
{ "html": "<!DOCTYPE html><html>...</html>", "framework": "flutter", "label": "Login Screen"}Response
{ "code": "import 'package:flutter/material.dart';\n...", "language": "dart", "fileExtension": ".dart", "fileName": "Login_Screen.dart", "framework": "flutter", "cached": false}Export to code
curl https://www.floow.design/api/v1/export-code \ -X POST \ -H "Authorization: Bearer fl_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "html": "<!DOCTYPE html><html>...</html>", "framework": "flutter", "label": "Checkout Screen" }'POST
/api/v1/figma-export🔑 Auth requiredConvert a frame's HTML into Figma clipboard data. Paste the response directly into Figma to import the screen as native vector layers.
- Response Content-Type is text/html — write the raw text to the clipboard, then paste into Figma.
- This endpoint deducts 1 export credit per call.
- Returns 402 if the account has no remaining credits or requires a plan upgrade.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
html | string | Yes | Full HTML markup of the screen to export. |
width | number | No | Frame width in pixels. Default 430. |
height | number | No | Frame height in pixels. Default 932. |
label | string | No | Name used for the top-level Figma layer. Truncated to 120 characters. |
Request body
{ "html": "<!DOCTYPE html><html>...</html>", "width": 390, "height": 844, "label": "Login Screen"}Response
<!-- Figma clipboard HTML (text/html) --><!-- Paste this into Figma using Cmd/Ctrl+V --><meta charset="utf-8"><div data-figma-paste="...">...</div>Export to Figma
curl https://www.floow.design/api/v1/figma-export \ -X POST \ -H "Authorization: Bearer fl_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "html": "<!DOCTYPE html><html>...</html>", "width": 390, "height": 844, "label": "Login Screen" }'