Developers & AI agents
Flooring Calculator API
Read the real, pack-rounded result of an autolay flooring layout over a public JSON endpoint — the same area, waste, tile-count and box totals the app shows and the PDF export prints. Every response links back to the full visual result on autolay.com.
What it returns
The numbers come from autolay's real layout engine — the boxes, cuts and waste of an actual tile layout, rounded up to whole purchasable packs. It is never a length × width × waste estimate. To calculate a plan you first generate it (which runs the layout engine), then read its totals here.
POST /api/calculate
Public, rate-limited (60 requests/minute). Body:
| Field | Type | Description |
|---|---|---|
token | string | Share token of a generated layout (see “Get a token” below). |
Request
curl -X POST https://www.autolay.com/api/calculate \
-H 'Content-Type: application/json' \
-d '{"token": "sTBv1nQm3kP0aX9wZ7yYbQ"}'Response
{
"engine": "autolay-layout-generator",
"source": "generated-layout",
"project_name": "Living Room",
"material_name": "Oak Parquet",
"totals": {
"net_area_m2": 20.0,
"required_material_area_m2": 22.68,
"waste_percent": 13.4,
"full_tiles": 48,
"cut_tiles": 15,
"physical_tiles": 63,
"pack_size": 4,
"packs": 16,
"surplus_pieces": 1,
"total_cost": 1088.0,
"currency": "EUR"
},
"result_url": "https://www.autolay.com/share/sTBv1nQm3kP0aX9wZ7yYbQ"
}result_url is a public page on autolay.com showing the full visual layout — hand it to the user.
Get a token
- Generate a layout in the planner at autolay.com/en/material-calculator (or
POST /api/generate-layoutwith a room boundary). - Share it — the planner's share button, or
POST /api/project/sharewith thesession_id— which returns a sharetoken. - Call
POST /api/calculatewith that token.
Machine-readable schema
GET /api/calculate/schema describes every input and output field with its unit. The full OpenAPI spec is at /openapi.json (tag Calculator).
Note: /api/ is disallowed in robots.txt — agents call the JSON directly; this page is the crawler-facing documentation.