Installation
The client is already installed in every GRID session workspace and in
the Python environment the GRID CLI prepares for
skill run. No separate
installation is needed. Start with the GRID installation guide.If you previously installed the client from public PyPI, use a GRID
session workspace or the CLI-managed Python environment for current
versions. Existing public PyPI releases remain available as historical
versions; no new releases are published there.
Authentication & Endpoint
Set up your API key (and endpoint, if needed):
- During onboarding General Robotics will give you a personal CORTEX API key.
- Export it so the client can pick it up automatically:
- If you run Cortex on-prem or on a managed cloud deployment, point the client at the Cortex API URL supplied with your deployment — the dedicated
grid-…API hostname, not theadmin-…portal hostname: - You can also pass the key directly when constructing the client:
Unified API
Every model is called through the same function:model_id— the model identifier (e.g."zoedepth","gsam2","pi05")**kwargs— model-specific inputs (image_input,prompt,left_image, etc.)
Discovery
List all available models and get per-model documentation at runtime:ModelType enum for IDE autocompletion:
Async & WebSocket Clients
AsyncCortexClient
Forasyncio-based applications, use AsyncCortexClient — same API as CortexClient but with await:
CortexHubClient (WebSocket)
For high-throughput pipelines,CortexHubClient provides a persistent WebSocket connection. It supports two patterns:
Request-response (simple)
HubResult contains request_id, model, data, ok, and optional error.
Troubleshooting
401 Unauthorized – Check that your shell actually hasGRID_CORTEX_API_KEY exported and that the key is correct. A key only works on the cluster it was created in. Anything the GRID CLI starts for you — including a robot workspace’s Python and notebooks — already has the active cluster’s key; a python you start yourself needs it exported.
Timeout / connection errors – If you are on-prem/managed cloud, confirm GRID_CORTEX_BASE_URL points to your instance. You can also adjust the default 30 s timeout: