# Microsoft MoGe-2 API

> MoGe-2 by Microsoft estimates metric 3D geometry from a single image and returns a textured GLB mesh, a PLY point cloud, and depth, normal and mask maps.

Source: https://www.sandbase.ai/models/microsoft/moge-2
API reference: https://www.sandbase.ai/models/microsoft/moge-2#api

## Facts

- Provider: Microsoft
- Type: Image model
- Model ID: `microsoft/moge-2`
- Price: $0.05 per run
- Capabilities: image to 3d
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "microsoft/moge-2",
  "image": "https://storage.googleapis.com/falserverless/example_inputs/dog.png",
  "apply_mask": true,
  "checkpoint": "vitl-normal",
  "resolution_level": 9
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Microsoft MoGe-2 through SandBase?

Create a SandBase API key, then send requests with the model ID "microsoft/moge-2" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Microsoft account?

No. One SandBase API key and balance gives you access to Microsoft MoGe-2 and the other models in the catalog; you do not need to sign up with Microsoft separately.

## README

### MoGe-2
MoGe-2 by Microsoft estimates metric 3D geometry from a single image and returns a textured GLB mesh, a PLY point cloud, and depth, normal and mask maps.
#### Fields
| Field | Type | Default | Notes |
|---|---|---|---|
| `image` | image URL, required | — | Input RGB image to reconstruct. |
| `checkpoint` | `vitl-normal` / `vitl` / `vitb-normal` / `vits-normal` | `vitl-normal` | MoGe-2 checkpoint. '-normal' variants also predict surface normals; 'vitl' has no normal map; smaller ViT-B/ViT-S variants are faster. |
| `resolution_level` | integer 0–9 | `9` | Processing resolution level (0-9). Higher values give finer detail but run slower; output size always matches the input. |
| `fov_x` | number 1–179 | — | Known horizontal field of view in degrees. Estimated from the image when omitted. |
| `apply_mask` | boolean | `true` | Mask out invalid regions (sky, background, uncertain) in the reconstruction. |
#### Output
- `url`: Main 3D file (GLB unless another export format is selected).
- `point_cloud`: Additional file returned by the provider.
- `depth_map`: Additional file returned by the provider.
- `normal_map`: Additional file returned by the provider.
- `mask`: Additional file returned by the provider.
#### Billing
$0.05 per request.
Failed runs are not charged.
#### Also on SandBase
Other Microsoft 3D endpoints: `microsoft/moge-3`.
