Prompt

Your prompt library, versioned, so nothing changes silently.

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

Your prompt library, versioned, so nothing changes silently.

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

Specification

Specification pending — no HIP in hanzoai/hips declares capability: prompt 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
RESTprompt at its own prefix6 operations
CLIhanzo prompt …6 of 6
SDKPromptApi in every published client6 methods
MCPtool prompt 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/prompt, operation get_prompt:

hanzo prompt list
import { Configuration, PromptApi } from 'hanzoai';

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

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

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

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

let result = prompt_api::get_prompt(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PromptApi;

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

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

MCP reaches prompt through the prompt 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_prompts"
         }
       }
     }'

Answers 200 with object — ok.

Endpoints

EndpointWhat it does
GET /v1/prompt/{name}Returns one of the caller org's prompts: its CURRENT template text plus the metadata of every version it has had.
DELETE /v1/prompt/{name}Removes one of the caller org's prompts and every version of it, answering 204.
GET /v1/prompt/catalogReturns the read-only starter prompt library shipped with the binary — reference content every tenant sees the same, NOT the caller's own prompts and never mixed into them.
GET /v1/prompt/metricsReturns real per-prompt statistics for the caller's org: how many versions each prompt has, which one is current, and when it was created and last changed.
GET /v1/promptReturns the caller org's prompt library as one row per prompt: its name, type, every version number it has, its taxonomy and when it last changed.
POST /v1/promptRecords a prompt for the caller's org and answers 201 with it.

All Hanzo APIs · Interactive reference

Was this page useful?