Installation
Install the GRID Cortex client package using pip:
Authentication
Set up your API key for authentication:
- During onboarding General Robotics will give you a personal CORTEX API key.
- Export it so the client can pick it up automatically:
- You can also pass the key directly when constructing the client:
Quick-Start (2 Lines)
Get started with just two lines of code:That is genuinely it—one line to import, one line to run. The
result type depends on the model (see tables below).Model Reference & Examples
The client exposes one unified function:model_idis the model name exactly as listed in the deployment (see tables).**kwargsare model-specific inputs such asimage_input,prompt,left_image, etc.
Depth & Stereo
| Model ID | Input kwargs | Returns |
|---|---|---|
midas | image_input (PIL/np.array) | numpy.ndarray depth map |
zoedepth | image_input (PIL/np.array) | numpy.ndarray depth map |
metric3d | image_input (PIL/np.array) | numpy.ndarray depth map |
foundationstereo | left_image, right_image | numpy.ndarray depth |
vggt-depth | image_input (PIL/np.array) | numpy.ndarray depth + uncertainty |
Object Detection
| Model ID | Input kwargs | Returns |
|---|---|---|
owlv2 | image_input (PIL/np.array), prompt (string) | dict with boxes, scores, labels |
groundingdino | image_input (PIL/np.array), prompt (string) | dict with boxes, scores, labels |
Image Segmentation
| Model ID | Input kwargs | Returns |
|---|---|---|
oneformer | image_input (PIL/np.array) | PIL.Image mask |
sam2 | image_input (PIL/np.array), prompts (list of [x,y] points) | PIL.Image mask |
gsam2 | image_input (PIL/np.array), prompts (list of [x,y] points), labels (list) | PIL.Image mask |
Feature Matching
| Model ID | Inputs | Outputs |
|---|---|---|
lightglue | image0_input (PIL/np.array), image1_input (PIL/np.array) | dict with points0, points1, matches, latency_ms |
Grasp Prediction
| Model ID | Input kwargs | Returns |
|---|---|---|
graspgen | depth_image, seg_image, camera_intrinsics, … | dict of 6-DoF grasps |
Vision-Language
| Model ID | Capability | Returns |
|---|---|---|
moondream | VQA / caption / detection / pointing | dict with output (varies by task) |
Troubleshooting
401 Unauthorized – Check that your shell actually hasGRID_CORTEX_API_KEY exported and that the key is correct.
Timeout / connection errors – You can adjust the default 30 s timeout: