List returns the caller org's prompt library as one row per prompt: its name,…
List returns 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.
GET /v1/prompt
| Address | https://api.hanzo.ai/v1/prompt |
| Method | GET |
| Operation | get_prompt |
| Auth | Authorization: Bearer $HANZO_API_KEY |
List returns 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. The template bodies are deliberately absent — fetch one prompt to read its text.
Request
GET /v1/prompt takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | promptList | ok |
200 body — 7 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | promptMeta[] | — | Data is one row per prompt the org owns, each with its version numbers and taxonomy — never the template bodies. |
data[].labels | body | string[] | — | Labels is the creator's free-form taxonomy, stored as given after trimming and de-duplication. |
data[].lastUpdatedAt | body | string | — | LastUpdatedAt is when the newest version was appended, RFC 3339 UTC. |
data[].name | body | string | — | Name is the prompt's org-unique handle and the URL segment it is fetched by: GET /v1/prompt/<name>. |
data[].tags | body | string[] | — | Tags is the second free-form taxonomy under the same rules as Labels. |
data[].type | body | string | — | Type labels the template's kind, "text" unless the creator said otherwise. |
data[].versions | body | integer[] | — | Versions lists every version NUMBER this prompt has, newest first, capped at the last 100. The highest is the current one. |
Failure carries the platform error shape — see Errors.
Examples
hanzo prompts listimport { 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 := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.PromptAPI.GetPrompt(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new PromptApi(client).getPrompt();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/prompt \
-H "Authorization: Bearer $HANZO_API_KEY"Tool prompts, op get_prompt — 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": "prompts",
"arguments": {
"op": "get_prompt",
"input": {}
}
}
}'How is this guide?