---
title: "One building's 3D model"
method: GET
path: "/public/buildings/{building_id}/model3d"
tags: ["Public building pages"]
---

# One building's 3D model

`GET /public/buildings/{building_id}/model3d`

## Request

- Base URL: `https://api.baseray.ai/v1`
- URL: `https://api.baseray.ai/v1/public/buildings/{building_id}/model3d`
- Auth: none required

What one building that has a public page is drawn in 3D from. A shell is served (`lod2`) only where it was measured from open data, with the credit its licence asks for; a shell measured from paid imagery never is. Otherwise the outline is raised to the height the page shows (`extruded`), or drawn flat where the page shows none (`flat`): no height is ever guessed. Any other building answers 404, as its page does.

## Path parameters

- `building_id` string, uuid, required

## Response `200`

OK

- PublicBuildingModel3D: What a building's public page draws it in 3D from. Positions are in metres about the outline's centroid at ground level (x east, y north, z up), to the centimetre.
  - `buildingId` string, uuid, required: The building's baseray id.
  - `kind` 'lod2' | 'extruded' | 'flat', required: `lod2`: a shell measured from open data, in `mesh`. `extruded`: raise `outline` to `heightM`. `flat`: draw `outline` flat; no height is known.
  - `heightM` number, nullable, required: The height the building's public page shows, in metres; null where it shows none.
  - `heightOnRecord` boolean, required: False where `heightM` is an estimate, or null.
  - `source` PublicModel3DSource, required: The credit a shell measured from open data carries wherever it is drawn.
    - `label` string, required: The open dataset the shell was measured from, as its credit names it.
    - `licence` string, required: The licence the dataset is published under, as people write it (`CC BY 4.0`).
    - `url` string, uri, required: The publisher's page of the dataset.
  - `outline` array[], required: The outer ring as `[x, y]` positions, counter-clockwise, without a closing position.
    - number[]
  - `holes` array[], required: Courtyards, each a clockwise ring like `outline`.
    - array[]
      - number[]
  - `mesh` PublicModel3DMesh, required: A shell's roof and walls as triangles.
    - `vertices` array[], required: `[x, y, z]` positions in metres, in the frame of `outline`.
      - number[]
    - `faces` array[], required: Triangles, each three indices into `vertices`.
      - integer[]

## Other responses

- `404`: No such page (`not_found`).
- `429`: Too many requests from this address in a minute (`rate_limited`); retry after `Retry-After` seconds.
- `503`: The building catalogue is unavailable right now (`unavailable`); retry after `Retry-After` seconds.

---

[API](https://skmtc.dev/baseray/apis/baseray-api.md) · [All operations](https://skmtc.dev/baseray/apis/baseray-api/llms.txt) · [OpenAPI document](https://skmtc.dev/baseray/apis/baseray-api/revisions/2dc2808717f7?raw)
