- Detected roof segments with boundary polygons
- Roof orientation data, including tilt and azimuth
- Candidate solar panel placements in portrait and landscape orientations
- Rooftop obstacle detection to avoid blocked areas
- Optional solar production metrics (flux values) for panel placement evaluation
- Normalized coordinates for rendering the layout on top of the provided map imagery
Base URL
https://api.solargenix.ai
Authentication
All requests to the roof layout API require an access token. Send the token in theToken header:
Access Token Generation
Access tokens can be generated from the Developer page on the SolarGenix application website. Token issuance is managed in the SolarGenix interface and is not exposed as a public API endpoint.Token generation flow
- Sign in to the SolarGenix interface.
- Open the Developer page.
- Select Generate Token.
- Copy the generated token and store it securely.
- Use the token in the
Tokenrequest header for all public API calls.
Token handling requirements
- Store tokens on your server side only.
- Do not expose tokens in client-side JavaScript, mobile bundles, or public repositories.
- Rotate the token immediately if it is exposed.
- Use a different token for each environment when possible.
Endpoint
POST /v1/layout/
Generates a roof layout and candidate panel placements for the requested property.
Full URL:
Request Headers
Request Body
Measurement Rules
- When
measurement_systemismetric, all dimensional request values must be sent in meters. - When
measurement_systemisimperial, all dimensional request values must be sent in feet. - Use one system consistently for
panel_size_w,panel_size_h, allsetbackvalues, andpanel_spacing.
Request Example
JavaScript Example
Success Response
The API returns a JSON object containing the source image and all detected roof geometry required to render candidate panel placements.Response Field Reference
Root Object
obstacles[]
roof_segments[]
roof_segments[].cycle[]
roof_segments[].panels_portrait[]
roof_segments[].panels_landscape[]
Coordinate System and Rendering Rules
The response uses normalized image coordinates for roof layout rendering.xandyvalues are relative to the image and typically fall in the range0.0to1.0.panel_sizeis also normalized and must be converted before rendering.cycle,obstacles,panels_portrait, andpanels_landscapeall use the same normalized coordinate system.
Pixel conversion
To draw the result on top of the returnedmap_image, convert coordinates using the final rendered image dimensions:
Important note
Do not treat response placement coordinates as raw pixels. They are normalized placement values intended to be scaled against the final image size.Common Implementation Notes
- Use
panels_portraitwhen you want portrait panel candidate placement. - Use
panels_landscapewhen you want landscape panel candidate placement. - Use
fluxto rank panel candidate placements when production scoring is enabled. - Use
cycleto draw roof segments. - Use
obstaclesto block placements or visually mark non-usable rooftop areas.