# FoundationStereo API

> Zero-shot stereo matching model trained on 1M synthetic pairs with monocular priors. It was a CVPR 2025 best paper nominee, and a real-time Fast-FoundationStereo also exists. Used for robot depth from stereo cameras.

## Details

- Model id: `nvidia/foundationstereo`
- Provider: NVIDIA
- Type: Perception · Depth
- Output: Disparity/depth from a stereo pair
- Embodiments: Any (video)
- Endpoint: `POST /v1/depth`
- Price: $0.10 per 1,000 calls
- Checkpoint served: `nvidia/c-foundationstereo-s`
- License: NVIDIA Open Model License (C-FoundationStereo-S; its frozen Depth Anything V2 feature extractor is ViT-S: DAv2-Small, Apache-2.0; EdgeNeXt side-tuned from NVIDIA's own ImageNet training)
- Released: January 2025
- Status: Live
- Paper or model card: https://arxiv.org/abs/2501.09898

## Inputs

What a request to FoundationStereo needs beyond the endpoint's generic fields (also in `GET https://api.openrobotics.dev/v1/models/nvidia/foundationstereo` as `inputs`).

- `right_image` (required): The right view of a rectified stereo pair (`image` is the left), the same size.
- `baseline` (required): Distance between the two cameras in meters (0–10).
- `intrinsics` (required): [fx, fy, cx, cy] in pixels of the image; depth = fx · baseline / disparity.
- Notes: A stereo model: `image` is the left view of a rectified pair.

## Call FoundationStereo

Send one request with your API key to `POST https://api.openrobotics.dev/v1/depth`. The response comes back in the same call. The [API reference](https://www.openrobotics.dev/docs/api/depth) lists every field. GPUs start on demand: after a quiet spell the first call returns `503` with `Retry-After` while one boots (never billed).

Python:

```python
import os, requests

res = requests.post(
  "https://api.openrobotics.dev/v1/depth",
  headers={"Authorization": f"Bearer {os.environ['OPENROBOTICS_API_KEY']}"},
  json={
    "model": "nvidia/foundationstereo",
    "image": "<base64 JPEG or PNG>",
    "right_image": "<…>",  # The right view of a rectified stereo pair (`image` is the left), the same size.
    "baseline": "<…>",  # Distance between the two cameras in meters (0–10).
    "intrinsics": "<…>",  # [fx, fy, cx, cy] in pixels of the image; depth = fx · baseline / disparity.
  },
).json()
res["depth"]["data"]    # row-major depth map
```

TypeScript:

```typescript
const res = await fetch("https://api.openrobotics.dev/v1/depth", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPENROBOTICS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "nvidia/foundationstereo",
    image: "<base64 JPEG or PNG>",
    right_image: "<…>",  // The right view of a rectified stereo pair (`image` is the left), the same size.
    baseline: "<…>",  // Distance between the two cameras in meters (0–10).
    intrinsics: "<…>",  // [fx, fy, cx, cy] in pixels of the image; depth = fx · baseline / disparity.
  }),
}).then((r) => r.json());
```

cURL:

```bash
curl https://api.openrobotics.dev/v1/depth \
  -H "Authorization: Bearer $OPENROBOTICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"nvidia/foundationstereo","image":"<base64 JPEG or PNG>","right_image":"<…>","baseline":"<…>","intrinsics":"<…>"}'
```

## Guides about FoundationStereo

- [NVIDIA GR00T N1 explained: N1, N1.5, N1.6 and N1.7](https://www.openrobotics.dev/blog/gr00t.md): What NVIDIA Isaac GR00T is, how its System 1/System 2 design works, what changed from N1 to N1.7, and which versions you can use commercially.
- [Physical AI explained: the open model stack for robots](https://www.openrobotics.dev/blog/physical-ai.md): What physical AI (embodied AI) means, the five kinds of models a robot uses, from perception to VLAs and world models, and open examples of each.

## FoundationStereo FAQ

### How do I run FoundationStereo without my own GPU?

Call POST /v1/depth on the OpenRobotics API with "model": "nvidia/foundationstereo". We run FoundationStereo on cloud GPUs that start on demand, so there is nothing to install or host.

### How much does the FoundationStereo API cost?

$0.10 per 1,000 calls, billed only for successful calls. Pay with prepaid credits or monthly pay-as-you-go.

### What license does FoundationStereo use?

The weights we serve (nvidia/c-foundationstereo-s) are released under NVIDIA Open Model License (C-FoundationStereo-S; its frozen Depth Anything V2 feature extractor is ViT-S: DAv2-Small, Apache-2.0; EdgeNeXt side-tuned from NVIDIA's own ImageNet training). Check the license for your use case.

### Is FoundationStereo open source?

FoundationStereo's weights are publicly available under NVIDIA Open Model License (C-FoundationStereo-S; its frozen Depth Anything V2 feature extractor is ViT-S: DAv2-Small, Apache-2.0; EdgeNeXt side-tuned from NVIDIA's own ImageNet training). OpenRobotics serves them behind an API so you can use the model without hosting it.

## Similar models

- [Depth Anything V2](https://www.openrobotics.dev/models/bytedance/depth-anything-v2.md): `bytedance/depth-anything-v2`, $0.10 per 1,000 calls
- [Depth Anything 3](https://www.openrobotics.dev/models/bytedance/depth-anything-3.md): `bytedance/depth-anything-3`, $0.10 per 1,000 calls
- [MoGe-2](https://www.openrobotics.dev/models/microsoft/moge-2.md): `microsoft/moge-2`, $0.10 per 1,000 calls
- [Prompt Depth Anything](https://www.openrobotics.dev/models/bytedance/prompt-depth-anything.md): `bytedance/prompt-depth-anything`, $0.10 per 1,000 calls
- [Video Depth Anything](https://www.openrobotics.dev/models/bytedance/video-depth-anything.md): `bytedance/video-depth-anything`, $0.10 per 1,000 calls
- [Lotus (Depth G v2.1)](https://www.openrobotics.dev/models/hkust-gz/lotus.md): `hkust-gz/lotus`, $0.10 per 1,000 calls
