Floor Plan API
Turn a sketch, photo or scan of a floor plan into a clean, editable 2D floor plan with one call. 5 credits per plan, saved in the property you choose.
Send a sketch, a photo or a scan of a floor plan and get back a clean 2D floor plan. Pedra reads the walls, doors, windows and room names, straightens them and draws a plan with the measurements written on the drawing. The plan is saved in a property, so your users can open it in Pedra and edit it like one they drew themselves.
Cost
5 credits per plan, charged only when a plan comes out. A reading that fails is free. If the account has fewer than 5 credits, the call is refused before anything runs, with a 403 that says so.
Where the plan is saved
Like images and videos: pass propertyId to add the plan to one of your properties (from list_properties or create_property). Leave it out and Pedra creates a new property, named with propertyName. The response always carries the propertyId and an appUrl that opens it in Pedra.
Create a floor plan
/api/create_floor_planReading a drawing takes about 1 to 3 minutes. By default the call waits and returns the finished plan (the connection is kept alive while it works). Pass "waitForCompletion": false to get a floorPlanId straight away and poll floor_plan_status instead.
apiKeystringrequiredimageUrlstringrequiredpropertyIdstringpropertyNamestringnamestringFloor planunitsstringmetric imperialmetricwaitForCompletionbooleantrueResponse
Floor plan status
/api/floor_plan_statusReturns "processing", "ready" (with imageUrl) or "failed". Never spends credits.
apiKeystringrequiredfloorPlanIdstringrequiredResponse
Getting a good plan
- Write at least one real measurement on the drawing (a wall length, or the total area). Without one, the layout comes out right but without sizes.
- Label each room. The names are carried onto the plan as written.
- Photograph the sheet from above, flat and well lit. Images are scaled down to 2400 px on the long side, so bigger files buy nothing.
Errors
400missingimageUrl, or the URL is not an image.403not enough credits (5 needed).404unknown API key, or apropertyId/floorPlanIdthat is not in this account.409the property already holds 30 floor plans.500the drawing could not be read. Nothing is charged and no plan is left behind.
From ChatGPT or Claude
The same endpoints are the pedra_create_floor_plan and pedra_get_floor_plan tools in the Pedra MCP server. Attach a photo of the sketch in the chat and ask for the plan.