Skip to content

PDF report

Dimensioned floor plan

Vector drawing of the supplied normalized Room Studio scan, including wall dimensions, openings, rotated fixtures and area. Includes a measured wall and element schedule.

Related HT Calc tool: Renovation Planner

Room Studio has no public screen on htcalc.com. Its renovation handoff uses this planner for project costs. This HT Calc screen includes a Plus sample for visitors.

Cost per success
1 calculation credit + 1 PDF report
Production plans
Business, Scale, Enterprise
Plan allowances
Free sandbox
Not available

Integration example

Request a PDF

Before your first report

  1. Open Widgets & reports in your paid workspace. Save your brand name, accent and at least one exact HTTPS origin, such as https://app.example.com. The origins identify sites allowed to embed your widgets.
  2. Under Report credentials, name a credential, select room-floor-plan and choose Create report credential. Save the secret shown once in your server’s HT_REPORT_KEY.
  3. Run the example on your server against accounts.hasstechapi.com, without an Origin header. A successful request returns a PDF and uses 1 calculation credit and 1 PDF report. Running the example again starts a new paid request.
What if the PDF doesn’t arrive?

For 400 INVALID_INPUT, inspect error.details when present. Paths for template fields start with input. Fix the indicated field and send a new request. This validation error uses zero credits and zero reports.

Open the .pdf.request.json file the example saved before sending. Within 24 hours, open Request lookup in the same workspace, choose Production, and paste the file’s requestId. The response’s X-Request-Id is a separate support identifier.

A settled request shows the calculation credits and report used. The service doesn’t keep the PDF for download. Check your saved file first. A replacement with a new ID uses 1 calculation credit and 1 PDF report on success.

If the outcome is unclear, check the workspace and ID, then look it up again before requesting a replacement.

Download the production PDF

Set HT_REPORT_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.

import { randomUUID } from "node:crypto";
import { writeFile } from "node:fs/promises";

const key = process.env.HT_REPORT_KEY;
if (!key) throw new Error("Set HT_REPORT_KEY on your server.");
const endpoint = "https://accounts.hasstechapi.com/v2/reports/room-floor-plan";
const input = {
  "scan": {
    "schemaVersion": 1,
    "units": "m",
    "source": "manual",
    "capturedAt": "2026-07-20T00:00:00.000Z",
    "rooms": [
      {
        "id": "room-golden",
        "label": "Living Room",
        "height": 2.4384,
        "walls": [
          {
            "id": "w1",
            "start": [
              0,
              0
            ],
            "end": [
              3.6576,
              0
            ],
            "thickness": 0.16,
            "height": 2.4384,
            "confidence": "high"
          },
          {
            "id": "w2",
            "start": [
              3.6576,
              0
            ],
            "end": [
              3.6576,
              3.048
            ],
            "thickness": 0.16,
            "height": 2.4384,
            "confidence": "high"
          },
          {
            "id": "w3",
            "start": [
              3.6576,
              3.048
            ],
            "end": [
              0,
              3.048
            ],
            "thickness": 0.16,
            "height": 2.4384,
            "confidence": "high"
          },
          {
            "id": "w4",
            "start": [
              0,
              3.048
            ],
            "end": [
              0,
              0
            ],
            "thickness": 0.16,
            "height": 2.4384,
            "confidence": "high"
          }
        ],
        "openings": [
          {
            "id": "o1",
            "type": "door",
            "wallId": "w1",
            "offset": 0.3048,
            "width": 0.9144,
            "height": 2.033016,
            "sillHeight": 0
          },
          {
            "id": "o2",
            "type": "window",
            "wallId": "w2",
            "offset": 0.6096,
            "width": 1.2192,
            "height": 0.9144,
            "sillHeight": 0.9144
          },
          {
            "id": "o3",
            "type": "opening",
            "wallId": "w3",
            "offset": 1.9,
            "width": 0.8,
            "height": 2.05,
            "sillHeight": 0
          }
        ],
        "fixtures": [
          {
            "id": "f1",
            "category": "sofa",
            "position": [
              0.82,
              2.28
            ],
            "footprint": [
              1.2,
              0.65
            ],
            "rotation": 25
          }
        ],
        "loopClosed": true,
        "nonManhattan": false
      }
    ],
    "adjacency": [],
    "calibration": null,
    "snapReport": null
  },
  "unitSystem": "imperial"
};
const requestId = Date.now() + "." + randomUUID();
const output = "room-floor-plan-" + requestId + ".pdf";
await writeFile(output + ".request.json", JSON.stringify({ requestId, endpoint }), {
  flag: "wx", mode: 0o600
});
console.error("Usage lookup ID:", requestId);

const response = await fetch(endpoint, {
  method: "POST",
  redirect: "error",
  headers: {
    "Authorization": "Bearer " + key,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ requestId, input })
});
if (!response.ok) {
  const problem = await response.json().catch(() => null);
  const code = problem?.error?.code || response.statusText;
  const delay = response.headers.get("retry-after");
  if (delay) console.error("Retry-After (seconds):", delay);
  console.error("HTTP " + response.status + " " + code + ". Usage lookup ID: " + requestId);
  if (Array.isArray(problem?.error?.details)) {
    for (const issue of problem.error.details) console.error("Input issue:", JSON.stringify(issue));
  }
  process.exitCode = 1;
} else {
  if (response.headers.get("content-type")?.split(";")[0] !== "application/pdf") {
    throw new Error("Expected a PDF. Look up request " + requestId);
  }
  await writeFile(output, new Uint8Array(await response.arrayBuffer()), { flag: "wx" });
  console.log("Saved", output);
}

Output

PDF output

A successful request returns the PDF file as application/pdf. The example writes a file named room-floor-plan-<requestId>.pdf.

See the Dimensioned floor plan calculation and example result.

Request contract

Accepted inputs

Fields for this example. Expand the schema for all supported combinations and limits.

FieldType, units and limits

scanRequired
object

Caller-supplied Room Studio normalized scan v1. No device capture or snapping occurs.

scan.schemaVersionRequired
integerMust equal 1
scan.unitsRequired
stringMust equal "m"
scan.sourceRequired
stringAllowed: "manual", "lidar", "manual_entry", "roomplan_ios"
scan.capturedAtRequired
string

UTC capture timestamp, with optional millisecond precision.

Format: date-time
scan.roomsRequired
array

One to four rooms in a shared world coordinate system.

Min items 1 · Max items 4
scan.rooms[].idRequired
string

Stable identifier within the plan.

Min length 1 · Max length 32
scan.rooms[].labelRequired
string

Printable room or fixture label (up to 40 ASCII characters).

Min length 1 · Max length 40
scan.rooms[].heightRequired
number · m

Room ceiling height.

Min 0.1 · Max 30
scan.rooms[].wallsRequired
array

Simple closed counterclockwise wall loop. Consecutive endpoints must meet.

Min items 3 · Max items 24
scan.rooms[].walls[].idRequired
string

Stable identifier within the plan.

Min length 1 · Max length 32
scan.rooms[].walls[].startRequired
array

World-space [x, y], in meters; positive y points north.

Min items 2 · Max items 2
scan.rooms[].walls[].endRequired
array

World-space [x, y], in meters; positive y points north.

Min items 2 · Max items 2
scan.rooms[].walls[].thicknessRequired
number · m

Wall band thickness.

Min 0.01 · Max 2
scan.rooms[].walls[].heightRequired
number · m

Wall height.

Min 0.1 · Max 30
scan.rooms[].walls[].confidenceRequired
stringAllowed: "low", "medium", "high"
scan.rooms[].openingsRequired
array

Doors, windows and passages.

Min items 0 · Max items 24
scan.rooms[].openings[].idRequired
string

Stable identifier within the plan.

Min length 1 · Max length 32
scan.rooms[].openings[].typeRequired
stringAllowed: "door", "window", "opening"
scan.rooms[].openings[].wallIdRequired
string

Stable identifier within the plan.

Min length 1 · Max length 32
scan.rooms[].openings[].offsetRequired
number · m

Distance from the start of its host wall.

Min 0 · Max 1000
scan.rooms[].openings[].widthRequired
number · m

Opening span along the wall.

Min 0.01 · Max 1000
scan.rooms[].openings[].heightRequired
number · m

Opening height.

Min 0.01 · Max 30
scan.rooms[].openings[].sillHeightRequired
number · m

Clearance above the floor.

Min 0 · Max 30
scan.rooms[].fixturesRequired
array

Measured fixture footprints.

Min items 0 · Max items 24
scan.rooms[].fixtures[].idRequired
string

Stable identifier within the plan.

Min length 1 · Max length 32
scan.rooms[].fixtures[].categoryRequired
string

Printable room or fixture label (up to 40 ASCII characters).

Min length 1 · Max length 40
scan.rooms[].fixtures[].footprintRequired
array

[width, depth], meters.

Min items 2 · Max items 2
scan.rooms[].fixtures[].positionRequired
array

World-space [x, y], in meters; positive y points north.

Min items 2 · Max items 2
scan.rooms[].fixtures[].rotationRequired
number · degrees

Counterclockwise rotation of the fixture footprint.

Min -360 · Max 360
scan.rooms[].loopClosedRequired
booleanMust equal true
scan.rooms[].nonManhattanRequired
boolean
scan.adjacencyRequired
array

Existing adjacency records.

Min items 0 · Max items 6
scan.adjacency[].roomIdARequired
string

Stable identifier within the plan.

Min length 1 · Max length 32
scan.adjacency[].roomIdBRequired
string

Stable identifier within the plan.

Min length 1 · Max length 32
scan.adjacency[].sharedWallIdsRequired
array

Wall identifiers in either adjacent room.

Min items 0 · Max items 24
scan.calibrationRequired
object or null
scan.snapReportRequired
object or null
unitSystemOptional
string

Display lengths in feet and inches (default) or meters. Source area labels use square feet.

Allowed: "imperial", "metric"
Example input (JSON)

The server example adds a fresh requestId to this input.

{
  "input": {
    "scan": {
      "schemaVersion": 1,
      "units": "m",
      "source": "manual",
      "capturedAt": "2026-07-20T00:00:00.000Z",
      "rooms": [
        {
          "id": "room-golden",
          "label": "Living Room",
          "height": 2.4384,
          "walls": [
            {
              "id": "w1",
              "start": [
                0,
                0
              ],
              "end": [
                3.6576,
                0
              ],
              "thickness": 0.16,
              "height": 2.4384,
              "confidence": "high"
            },
            {
              "id": "w2",
              "start": [
                3.6576,
                0
              ],
              "end": [
                3.6576,
                3.048
              ],
              "thickness": 0.16,
              "height": 2.4384,
              "confidence": "high"
            },
            {
              "id": "w3",
              "start": [
                3.6576,
                3.048
              ],
              "end": [
                0,
                3.048
              ],
              "thickness": 0.16,
              "height": 2.4384,
              "confidence": "high"
            },
            {
              "id": "w4",
              "start": [
                0,
                3.048
              ],
              "end": [
                0,
                0
              ],
              "thickness": 0.16,
              "height": 2.4384,
              "confidence": "high"
            }
          ],
          "openings": [
            {
              "id": "o1",
              "type": "door",
              "wallId": "w1",
              "offset": 0.3048,
              "width": 0.9144,
              "height": 2.033016,
              "sillHeight": 0
            },
            {
              "id": "o2",
              "type": "window",
              "wallId": "w2",
              "offset": 0.6096,
              "width": 1.2192,
              "height": 0.9144,
              "sillHeight": 0.9144
            },
            {
              "id": "o3",
              "type": "opening",
              "wallId": "w3",
              "offset": 1.9,
              "width": 0.8,
              "height": 2.05,
              "sillHeight": 0
            }
          ],
          "fixtures": [
            {
              "id": "f1",
              "category": "sofa",
              "position": [
                0.82,
                2.28
              ],
              "footprint": [
                1.2,
                0.65
              ],
              "rotation": 25
            }
          ],
          "loopClosed": true,
          "nonManhattan": false
        }
      ],
      "adjacency": [],
      "calibration": null,
      "snapReport": null
    },
    "unitSystem": "imperial"
  }
}
Full JSON schema
{
  "type": "object",
  "properties": {
    "scan": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "integer",
          "const": 1
        },
        "units": {
          "type": "string",
          "const": "m"
        },
        "source": {
          "type": "string",
          "enum": [
            "manual",
            "lidar",
            "manual_entry",
            "roomplan_ios"
          ]
        },
        "capturedAt": {
          "type": "string",
          "format": "date-time",
          "description": "UTC capture timestamp, with optional millisecond precision."
        },
        "rooms": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32,
                "pattern": "^[A-Za-z0-9_-]+$",
                "description": "Stable identifier within the plan."
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40,
                "pattern": "^[ -~]+$",
                "description": "Printable room or fixture label (up to 40 ASCII characters)."
              },
              "height": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 30,
                "x-unit": "m",
                "description": "Room ceiling height."
              },
              "walls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 32,
                      "pattern": "^[A-Za-z0-9_-]+$",
                      "description": "Stable identifier within the plan."
                    },
                    "start": {
                      "type": "array",
                      "items": {
                        "type": "number",
                        "minimum": -1000,
                        "maximum": 1000,
                        "x-unit": "m",
                        "description": "World coordinate."
                      },
                      "minItems": 2,
                      "maxItems": 2,
                      "description": "World-space [x, y], in meters; positive y points north."
                    },
                    "end": {
                      "type": "array",
                      "items": {
                        "type": "number",
                        "minimum": -1000,
                        "maximum": 1000,
                        "x-unit": "m",
                        "description": "World coordinate."
                      },
                      "minItems": 2,
                      "maxItems": 2,
                      "description": "World-space [x, y], in meters; positive y points north."
                    },
                    "thickness": {
                      "type": "number",
                      "minimum": 0.01,
                      "maximum": 2,
                      "x-unit": "m",
                      "description": "Wall band thickness."
                    },
                    "height": {
                      "type": "number",
                      "minimum": 0.1,
                      "maximum": 30,
                      "x-unit": "m",
                      "description": "Wall height."
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "start",
                    "end",
                    "thickness",
                    "height",
                    "confidence"
                  ],
                  "additionalProperties": false,
                  "description": "One measured wall in the ordered counterclockwise boundary."
                },
                "minItems": 3,
                "maxItems": 24,
                "description": "Simple closed counterclockwise wall loop. Consecutive endpoints must meet."
              },
              "openings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 32,
                      "pattern": "^[A-Za-z0-9_-]+$",
                      "description": "Stable identifier within the plan."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "door",
                        "window",
                        "opening"
                      ]
                    },
                    "wallId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 32,
                      "pattern": "^[A-Za-z0-9_-]+$",
                      "description": "Stable identifier within the plan."
                    },
                    "offset": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1000,
                      "x-unit": "m",
                      "description": "Distance from the start of its host wall."
                    },
                    "width": {
                      "type": "number",
                      "minimum": 0.01,
                      "maximum": 1000,
                      "x-unit": "m",
                      "description": "Opening span along the wall."
                    },
                    "height": {
                      "type": "number",
                      "minimum": 0.01,
                      "maximum": 30,
                      "x-unit": "m",
                      "description": "Opening height."
                    },
                    "sillHeight": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 30,
                      "x-unit": "m",
                      "description": "Clearance above the floor."
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "wallId",
                    "offset",
                    "width",
                    "height",
                    "sillHeight"
                  ],
                  "additionalProperties": false,
                  "description": "Opening in its named host wall. Offset plus width must fit the wall."
                },
                "minItems": 0,
                "maxItems": 24,
                "description": "Doors, windows and passages."
              },
              "fixtures": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 32,
                      "pattern": "^[A-Za-z0-9_-]+$",
                      "description": "Stable identifier within the plan."
                    },
                    "category": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40,
                      "pattern": "^[ -~]+$",
                      "description": "Printable room or fixture label (up to 40 ASCII characters)."
                    },
                    "footprint": {
                      "type": "array",
                      "items": {
                        "type": "number",
                        "minimum": 0.05,
                        "maximum": 100,
                        "x-unit": "m",
                        "description": "Footprint dimension."
                      },
                      "minItems": 2,
                      "maxItems": 2,
                      "description": "[width, depth], meters."
                    },
                    "position": {
                      "type": "array",
                      "items": {
                        "type": "number",
                        "minimum": -1000,
                        "maximum": 1000,
                        "x-unit": "m",
                        "description": "World coordinate."
                      },
                      "minItems": 2,
                      "maxItems": 2,
                      "description": "World-space [x, y], in meters; positive y points north."
                    },
                    "rotation": {
                      "type": "number",
                      "minimum": -360,
                      "maximum": 360,
                      "x-unit": "degrees",
                      "description": "Counterclockwise rotation of the fixture footprint."
                    }
                  },
                  "required": [
                    "id",
                    "category",
                    "footprint",
                    "position",
                    "rotation"
                  ],
                  "additionalProperties": false,
                  "description": "Placed and rotated fixture."
                },
                "minItems": 0,
                "maxItems": 24,
                "description": "Measured fixture footprints."
              },
              "loopClosed": {
                "type": "boolean",
                "const": true
              },
              "nonManhattan": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "label",
              "height",
              "walls",
              "openings",
              "fixtures",
              "loopClosed",
              "nonManhattan"
            ],
            "additionalProperties": false,
            "description": "Measured room with a nondegenerate boundary."
          },
          "minItems": 1,
          "maxItems": 4,
          "description": "One to four rooms in a shared world coordinate system."
        },
        "adjacency": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "roomIdA": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32,
                "pattern": "^[A-Za-z0-9_-]+$",
                "description": "Stable identifier within the plan."
              },
              "roomIdB": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32,
                "pattern": "^[A-Za-z0-9_-]+$",
                "description": "Stable identifier within the plan."
              },
              "sharedWallIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Stable identifier within the plan."
                },
                "minItems": 0,
                "maxItems": 24,
                "description": "Wall identifiers in either adjacent room."
              }
            },
            "required": [
              "roomIdA",
              "roomIdB",
              "sharedWallIds"
            ],
            "additionalProperties": false,
            "description": "Optional source adjacency record."
          },
          "minItems": 0,
          "maxItems": 6,
          "description": "Existing adjacency records."
        },
        "calibration": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "wallId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Stable identifier within the plan."
                },
                "measuredM": {
                  "type": "number",
                  "minimum": 0.001,
                  "maximum": 1000,
                  "x-unit": "m",
                  "description": "Original measurement."
                },
                "enteredM": {
                  "type": "number",
                  "minimum": 0.001,
                  "maximum": 1000,
                  "x-unit": "m",
                  "description": "User-entered measurement."
                },
                "scaleApplied": {
                  "type": "number",
                  "minimum": 0.001,
                  "maximum": 1000,
                  "x-unit": "ratio",
                  "description": "Already applied to the normalized coordinates."
                }
              },
              "required": [
                "wallId",
                "measuredM",
                "enteredM",
                "scaleApplied"
              ],
              "additionalProperties": false,
              "description": "Optional recorded calibration. Coordinates are already calibrated."
            },
            {
              "type": "null"
            }
          ]
        },
        "snapReport": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "wallsSnapped": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1024
                },
                "wallsTotal": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1024
                },
                "maxCorrectionDeg": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 360,
                  "x-unit": "degrees",
                  "description": "Maximum correction."
                },
                "dominantAxisDeg": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 90,
                  "x-unit": "degrees",
                  "description": "Dominant wall direction."
                },
                "closureResidualBeforeM": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000,
                  "x-unit": "m",
                  "description": "Pre-snap closure residual."
                },
                "closureResidualAfterM": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000,
                  "x-unit": "m",
                  "description": "Post-snap closure residual."
                },
                "weldedWallCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1024
                }
              },
              "required": [
                "wallsSnapped",
                "wallsTotal",
                "maxCorrectionDeg",
                "dominantAxisDeg",
                "closureResidualBeforeM",
                "closureResidualAfterM",
                "weldedWallCount"
              ],
              "additionalProperties": false,
              "description": "Optional source snap record."
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "schemaVersion",
        "units",
        "source",
        "capturedAt",
        "rooms",
        "adjacency",
        "calibration",
        "snapReport"
      ],
      "additionalProperties": false,
      "description": "Caller-supplied Room Studio normalized scan v1. No device capture or snapping occurs."
    },
    "unitSystem": {
      "type": "string",
      "enum": [
        "imperial",
        "metric"
      ],
      "description": "Display lengths in feet and inches (default) or meters. Source area labels use square feet."
    }
  },
  "required": [
    "scan"
  ],
  "additionalProperties": false,
  "description": "Creates the dimensioned Room Studio print SVG. The maximum request body is 16 KiB. The print view must fit 510 by 6,000 source pixels (including its disclaimer)."
}

Production endpoint: POST https://accounts.hasstechapi.com/v2/reports/room-floor-plan
Formula: room-floor-plan-htcalc-719df2c0e105-v1 · Report version: room-floor-plan-pdf-v1