# Reconstruct 3D

> Send one or more views of a scene and get camera poses and a 3D point cloud.

`POST https://api.openrobotics.dev/v1/reconstruct`

## Authorization

`Authorization: Bearer sk-orb-v1-…`, your [API key](https://www.openrobotics.dev/docs/authentication), or a free [test key](https://www.openrobotics.dev/docs/authentication#test-keys) (`sk-orb-test-…`; no account? get one with [`POST /sandbox/keys`](https://www.openrobotics.dev/docs/api/create-sandbox-key)).

## Request body

JSON, with `Content-Type: application/json`.

- `model` (string, required): The reconstruction model to run, e.g. `meta/vggt`. The live models for this endpoint are listed below.
- `images` (string[], required): 1–16 views of the scene, base64 JPEG or PNG, each under 4 MB of base64. For a single view you can send `image` instead.

## Response

- `id` (string): Unique id of this call, e.g. `rec_48213`. It matches the call in your Activity dashboard.
- `model` (string): The model that answered.
- `backend` (string): `"http"`: the real model ran on a GPU. `"simulated"`: stand-in output of the same shape, as test keys get.
- `sandbox` (boolean): `true` when the call was made with a [test key](https://www.openrobotics.dev/docs/authentication#test-keys): the output is simulated, nothing ran on a GPU and nothing was charged. Absent otherwise.
- `cameras` (object[]): One per image, in order.
  - `intrinsics` (number[4]): `[fx, fy, cx, cy]` in pixels.
  - `pose` (number[16]): Camera-to-world 4×4 matrix, row-major.
- `points` (number[][]): The point cloud, `[x, y, z]` in world coordinates.
- `unit` (string): `"m"`: meters. `"relative"`: one unknown scale for the whole scene (e.g. VGGT). Absent means meters.
- `usage` (object): What the call cost.
  - `cost_usd` (number): Charged to your credits, in US dollars.
  - `latency_ms` (integer): Time the model took, in milliseconds.

## Errors

Plus the errors every endpoint shares: see [Errors](https://www.openrobotics.dev/docs/errors).

## Example request

Python:

```python
import os, requests

res = requests.post(
  "https://api.openrobotics.dev/v1/reconstruct",
  headers={"Authorization": f"Bearer {os.environ['OPENROBOTICS_API_KEY']}"},
  json={
    "model": "meta/vggt",
    "images": ["<base64 JPEG or PNG>", "<base64 JPEG or PNG>"],
  },
).json()
res["cameras"], res["points"]  # camera poses + point cloud
```

TypeScript:

```typescript
const res = await fetch("https://api.openrobotics.dev/v1/reconstruct", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPENROBOTICS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "meta/vggt",
    images: ["<base64 JPEG or PNG>", "<base64 JPEG or PNG>"],
  }),
}).then((r) => r.json());
```

cURL:

```bash
curl https://api.openrobotics.dev/v1/reconstruct \
  -H "Authorization: Bearer $OPENROBOTICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"meta/vggt","images":["<base64 JPEG or PNG>","<base64 JPEG or PNG>"]}'
```

## Example response

```json
{
  "id": "rec_48213",
  "model": "meta/vggt",
  "backend": "http",
  "unit": "relative",
  "cameras": [
    {
      "intrinsics": [512.3, 512.3, 259, 194],
      "pose": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
    },
    …
  ],
  "points": [
    [0.12, -0.04, 1.31],
    …
  ],
  "usage": { "cost_usd": 0.0005, "latency_ms": 900 }
}
```

## Models

3 live for `/reconstruct`:

- [VGGT](https://www.openrobotics.dev/models/meta/vggt.md): `meta/vggt`, $0.10 per 1,000 calls
- [MapAnything](https://www.openrobotics.dev/models/meta/mapanything.md): `meta/mapanything`, $0.10 per 1,000 calls
- [LingBot-Map](https://www.openrobotics.dev/models/robbyant/lingbot-map.md): `robbyant/lingbot-map`, $0.10 per 1,000 calls
