> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reilabs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Spatial Vision

> Use non-LLM spatial VQA and grounded pointing with explicit degradation checks.

The canonical Spatial Vision endpoint and its compatibility alias are:

```text theme={null}
POST https://rei-neuroadapt-api.reilabs.org/api/v1/vision/spatial
POST https://rei-neuroadapt-api.reilabs.org/api/v1/vision/query
```

Both routes provide spatial yes/no answers and normalized object-relative pointing without invoking a language model. Use `/vision/spatial` for new integrations; `/vision/query` is the compatibility alias.

<Note title="No Domain setup required">
  Spatial Vision requests are stateless. Send the question and image directly, with depth when the task uses it. You do not need a Domain, events, feedback, or learner configuration. When detector and segmenter processing is enabled, callers do not need to provide object hints or scene masks.
</Note>

```bash theme={null}
curl -fsS -X POST https://rei-neuroadapt-api.reilabs.org/api/v1/vision/spatial \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"question":"Pinpoint empty space to the left of the bowl.","image_base64":"<base64-image>","use_detector":true,"use_segmenter":true}'
```

## Request contract

Send a required `question` and one image field:

* `image`, `image_base64`, or `image_url`: base64 bytes or a data URL;
* `depth` or `depth_base64`: optional depth input in the same representation;
* `object_hints`: optional caller-supplied normalized boxes;
* `scene_masks`: optional caller-supplied masks;
* `use_detector` and `use_segmenter`: grounding controls.

Despite its compatibility name, `image_url` must be a base64 value or data URL, not an arbitrary remote URL.

```json theme={null}
{
  "question": "Pinpoint empty space to the left of the bowl.",
  "image_base64": "<base64-image>",
  "use_detector": true,
  "use_segmenter": true
}
```

## Validate grounded output

Returned points and bounding boxes are normalized to `[0, 1]`. Inspect `answer`, `confidence`, `points`, `rationale`, and the parsed `query` fields.

A successful HTTP response can still be a degraded fallback. For object-relative pointing, treat output as grounded only when:

```text theme={null}
vision.detector.status === "ok"
vision.detector.region_count > 0
```

When segmentation is needed, also inspect `vision.segmenter.status` and `vision.segmenter.mask_count`.
