Response Format
Content Types
The /run endpoint returns JSON:
Content-Type: application/json
Success Response
JSON object containing simulation results:
{
"status": "success",
"result": [[/* df values array */]],
"mask": [[/*bool mask showing the room boundary*/]]
}
Example response headers:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 524288
Error Response
All errors return JSON with an error message:
{
"status": "error",
"error": "Error message description"
}
Common Error Responses
Missing required field (400 Bad Request):
{
"error": "Missing required parameters: window_frame_ratio"
}
Out of range value (400 Bad Request):
{
"error": "Parameter 'height_roof_over_floor' value 35.0 outside valid range [0, 30]"
}
Invalid authentication (401 Unauthorized):
{
"error": "Invalid or missing API token"
}
Internal error (500 Internal Server Error):
{
"error": "Simulation failed: unable to process room geometry"
}
Status Codes
| Code | Description |
|---|---|
| 200 | Success - returns simulation results |
| 400 | Invalid parameters or missing required fields |
| 401 | Missing or invalid API token |
| 500 | Internal server error |
| 503 | Service unavailable |
| 504 | Request timeout |