Constructor
API key. Uses GRID_CORTEX_API_KEY env var if None.
Base URL of the Cortex API. If None, uses GRID_CORTEX_BASE_URL env var or HTTPClient’s default.
default:"30.0"
Default timeout for HTTP requests in seconds.
Methods
available_models()
run and help.
close()
get_info()
- version (str): Grid-Cortex version (e.g., “v0.2.49”)
- models (list): List of deployed models with:
- name (str): Model identifier
- status (str): Deployment status (“RUNNING”, etc.)
- route (str): HTTP route prefix
- replicas (int): Number of running replicas
help()
run.
required
Canonical model identifier (e.g., “zoedepth”, “owlv2”, “gsam2”).
- Class-level docstring with usage examples and parameter descriptions
- Preprocess method documentation (input parameters and validation)
- Postprocess method documentation (output format and data types)
run()
required
The identifier of the model to run (use
available_models to see all available options). Examples: “zoedepth”, “owlv2”, “gsam2”.Optional timeout in seconds for the HTTP request. If None, uses the client’s default timeout.
default:"False"
If True, enables detailed logging for this specific call to help troubleshoot issues.
default:"False"
If True, returns the raw API response without postprocessing.
Model-specific input parameters. Each model’s page in the Cortex Models docs section and
help document its exact inputs.help.
Raises:
NotImplementedError: If model_id is not found in available models.
CortexAPIError: If the API returns an error response.
CortexNetworkError: If network communication fails.
ValueError: If input validation or processing fails.
run_with_detections()
run, but returns per-instance detections (currently SAM3 text/box prompts).