List library

Lists what you made and what members of your organization shared with you, newest first.

GET /v1/library

Addresshttps://api.hanzo.ai/v1/library
MethodGET
Operationget_library
AuthAuthorization: Bearer $HANZO_API_KEY

Lists what you made and what members of your organization shared with you, newest first. Narrow it by kind, source, ref, project, a name search and a time range; scope mine keeps only yours and shared only what others shared. Each item carries signed URLs that work for an hour.

Request

10 fields.

FieldInTypeRequiredDescription
kindquerystring—Kind keeps one kind: image, video, audio, document, slides, type, model, code or file.
sourcequerystring—Source keeps what one product made: chat, dev, studio or workflow.
refquerystring—Ref keeps what one conversation, run or Studio run made.
projectquerystring—Project keeps one project's items.
qquerystring—Q keeps the items whose name contains it, ignoring case.
sincequerystring—Since and Until bound when it was made: RFC 3339, or a date (YYYY-MM-DD).
untilquerystring—
scopequerystring—Scope is all (yours and what your org shared, the default), mine, or shared.
limitqueryinteger—Limit bounds the page: default 60, at most 200.
cursorquerystring—Cursor continues a list from the page before's next.

Response

StatusBodyMeaning
200library.itemPageok
defaultproblem-detailsrefused

200 body — 31 fields.

FieldInTypeAlwaysDescription
databodylibrary.LibraryItem[]—Data are the items, newest first.
data[].bybodystring—By is the owner as a reader names them: the name, else the address, the identity boundary carried when the item was made.
data[].bytesbodyinteger (int64)—
data[].createdbodystring—
data[].downloadbodystring—
data[].expiresbodystring—
data[].heightbodyinteger (int64)—
data[].idbodystring—
data[].kindbodystring—
data[].mimebodystring—
data[].minebodyboolean—
data[].namebodystring—
data[].originbodystring—
data[].ownerbodystring—
data[].pagesbodyinteger (int64)—
data[].previewbodystring—
data[].projectbodystring—
data[].refbodystring—
data[].secondsbodynumber (double)—
data[].sharedbodyboolean—
data[].sourcebodystring—
data[].updatedbodystring—
data[].uploadbodylibrary.LibraryUpload—
data[].upload.expiresbodystring—
data[].upload.headersbodylibrary.Field[]—Headers are the ones the PUT must carry.
data[].upload.headers[].namebodystring—Name is the field's name.
data[].upload.headers[].valuebodystring—Value is the field's value, verbatim.
data[].upload.urlbodystring—
data[].urlbodystring—
data[].widthbodyinteger (int64)—
nextbodystring—Next continues the list as cursor; empty at its end.

Failure carries the platform error shape — see Errors.

Examples

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"
         }
       }
     }'

Library API · All Hanzo APIs · Interactive reference

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