Constructor
Signature
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.
default:"30.0"
Default timeout for HTTP requests in seconds.
Optional caller-owned observer for run events. The client does not close it.
Methods
available_models()
Signature
run and help.
close()
Signature
get_info()
Signature
help()
Signature
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()
Signature
required
The identifier of the model to run.
Optional timeout in seconds for the HTTP request.
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.
CortexAPIError: If the API returns an error.
CortexNetworkError: If network communication fails.
ValueError: If input validation or processing fails.