Library

The Library: everything a person made, in one place.

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

The Library: everything a person made, in one place.

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

Specification

Specification pending — no HIP in hanzoai/hips declares capability: library 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
RESTlibrary at its own prefix6 operations
CLIhanzo library …6 of 6
SDKLibraryApi in every published client6 methods
MCPtool library on https://api.hanzo.ai/v1/mcp6 operations, 2 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/library, operation get_library:

hanzo library list
import { Configuration, LibraryApi } from 'hanzoai';

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

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

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

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

let result = library_api::get_library(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LibraryApi;

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

var result = new LibraryApi(client).getLibrary();
curl https://api.hanzo.ai/v1/library \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches library through the library tool, which names its 6 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

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

Answers 200 with object — ok.

Endpoints

EndpointWhat it does
GET /v1/library/{id}Reads one item with fresh signed URLs.
PATCH /v1/library/{id}Renames one of your items, shares it with your organization or stops sharing it, moves it to a project, or commits a reserved upload.
DELETE /v1/library/{id}Deletes one of your items and its bytes.
GET /v1/library/unownedReads, for a SuperAdmin alone, the organization's items that record no owner.
GET /v1/libraryLists what you made and what members of your organization shared with you, newest first.
POST /v1/libraryKeeps one thing you made in your Library: its bytes go to your own prefix of the Library's store, and it is listed to you alone until you share it.

All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.