Space

Where work lives: drives, folders and the files in them.

Also for this capability: API · CLI · MCP · SDKs

Where work lives: drives, folders and the files in them.

Base URLhttps://api.hanzo.ai
Operations7
AuthAuthorization: Bearer $HANZO_API_KEY

Specification

Specification pending — no HIP in hanzoai/hips declares capability: space yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.

Four surfaces

SurfaceReaches this capability asCoverage
RESTspace at its own prefix7 operations
CLIhanzo space …7 of 7
SDKSpaceApi in every published client7 methods
MCPtool space on https://api.hanzo.ai/v1/mcp7 operations, 1 under the document's own id — ask describe for the rest

Quickstart

export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys

Then the first call — a read that needs nothing but the key. GET /v1/space/health, operation get_space_health:

hanzo space health
import { Configuration, SpaceApi } from 'hanzoai';

const api = new SpaceApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getSpaceHealth();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import SpaceApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = SpaceApi(client).get_space_health()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.SpaceAPI.GetSpaceHealth(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, space_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = space_api::get_space_health(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SpaceApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new SpaceApi(client).getSpaceHealth();
curl https://api.hanzo.ai/v1/space/health \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool space, op get_space_health — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "space",
         "arguments": {
           "op": "get_space_health",
           "input": {}
         }
       }
     }'

Answers 200 with object — ok.

Endpoints

EndpointWhat it does
GET /v1/space/{space}/drives/{drive}/filesLists one folder level of a drive.
DELETE /v1/space/{space}/drives/{drive}Removes an EMPTY drive and answers 204.
GET /v1/space/{space}/drivesLists a space's drives.
POST /v1/space/{space}/drivesMakes a new drive in a space and answers 201 with it.
GET /v1/space/healthReports whether this deployment can serve spaces, drives and files.
GET /v1/space/spacesLists the caller org's own spaces.
POST /v1/space/spacesMakes a new space for the caller's org and answers 201 with it.

All Hanzo APIs · Interactive reference

Was this page useful?