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.
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
- 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. - Under Report credentials, name a credential, select
room-floor-planand choose Create report credential. Save the secret shown once in your server’sHT_REPORT_KEY. - Run the example on your server against
accounts.hasstechapi.com, without anOriginheader. 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.
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
scanRequiredCaller-supplied Room Studio normalized scan v1. No device capture or snapping occurs.
scan.schemaVersionRequiredscan.unitsRequiredscan.sourceRequiredscan.capturedAtRequiredUTC capture timestamp, with optional millisecond precision.
Format: date-timescan.roomsRequiredOne to four rooms in a shared world coordinate system.
Min items 1 · Max items 4scan.rooms[].idRequiredStable identifier within the plan.
Min length 1 · Max length 32scan.rooms[].labelRequiredPrintable room or fixture label (up to 40 ASCII characters).
Min length 1 · Max length 40scan.rooms[].heightRequiredRoom ceiling height.
Min 0.1 · Max 30scan.rooms[].wallsRequiredSimple closed counterclockwise wall loop. Consecutive endpoints must meet.
Min items 3 · Max items 24scan.rooms[].walls[].idRequiredStable identifier within the plan.
Min length 1 · Max length 32scan.rooms[].walls[].startRequiredWorld-space [x, y], in meters; positive y points north.
Min items 2 · Max items 2scan.rooms[].walls[].endRequiredWorld-space [x, y], in meters; positive y points north.
Min items 2 · Max items 2scan.rooms[].walls[].thicknessRequiredWall band thickness.
Min 0.01 · Max 2scan.rooms[].walls[].heightRequiredWall height.
Min 0.1 · Max 30scan.rooms[].walls[].confidenceRequiredscan.rooms[].openingsRequiredDoors, windows and passages.
Min items 0 · Max items 24scan.rooms[].openings[].idRequiredStable identifier within the plan.
Min length 1 · Max length 32scan.rooms[].openings[].typeRequiredscan.rooms[].openings[].wallIdRequiredStable identifier within the plan.
Min length 1 · Max length 32scan.rooms[].openings[].offsetRequiredDistance from the start of its host wall.
Min 0 · Max 1000scan.rooms[].openings[].widthRequiredOpening span along the wall.
Min 0.01 · Max 1000scan.rooms[].openings[].heightRequiredOpening height.
Min 0.01 · Max 30scan.rooms[].openings[].sillHeightRequiredClearance above the floor.
Min 0 · Max 30scan.rooms[].fixturesRequiredMeasured fixture footprints.
Min items 0 · Max items 24scan.rooms[].fixtures[].idRequiredStable identifier within the plan.
Min length 1 · Max length 32scan.rooms[].fixtures[].categoryRequiredPrintable room or fixture label (up to 40 ASCII characters).
Min length 1 · Max length 40scan.rooms[].fixtures[].footprintRequired[width, depth], meters.
Min items 2 · Max items 2scan.rooms[].fixtures[].positionRequiredWorld-space [x, y], in meters; positive y points north.
Min items 2 · Max items 2scan.rooms[].fixtures[].rotationRequiredCounterclockwise rotation of the fixture footprint.
Min -360 · Max 360scan.rooms[].loopClosedRequiredscan.rooms[].nonManhattanRequiredscan.adjacencyRequiredExisting adjacency records.
Min items 0 · Max items 6scan.adjacency[].roomIdARequiredStable identifier within the plan.
Min length 1 · Max length 32scan.adjacency[].roomIdBRequiredStable identifier within the plan.
Min length 1 · Max length 32scan.adjacency[].sharedWallIdsRequiredWall identifiers in either adjacent room.
Min items 0 · Max items 24scan.calibrationRequiredscan.snapReportRequiredunitSystemOptionalDisplay 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