Lists the public starter-kit catalog plus, for a validated caller, that org's…
Lists the public starter-kit catalog plus, for a validated caller, that org's own private kits.
GET /v1/template
| Address | https://api.hanzo.ai/v1/template |
| Method | GET |
| Operation | get_template |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Lists the public starter-kit catalog plus, for a validated caller, that org's own private kits. No request field can widen the scope: the org comes from the validated principal, so an anonymous or cross-org caller structurally sees the public catalog only.
Request
GET /v1/template takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | kitList | ok |
200 body — 20 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | StarterKit[] | — | Data is the public catalog followed by the caller org's own kits. |
data[].category | body | string | — | groups the kit in the gallery browser ("Portfolio", "SaaS") |
data[].demo | body | string | — | live demo (<slug>.hanzo.app), when deployed |
data[].description | body | string | — | the browse-card blurb |
data[].features | body | string[] | — | the highlights the card lists, at most 32 |
data[].framework | body | string | — | the stack the kit is built on ("Next.js 14.2 + TS") |
data[].org | body | string | — | owner of a PRIVATE template; empty in the public catalog |
data[].preview | body | string | — | the still image the browse card renders |
data[].rating | body | number | — | Rating is public-gallery curation, on the same terms as Tier: catalog-only, never accepted from a request, absent on a customer's own kit. |
data[].slug | body | string | — | the kit's identity — lowercase alphanumeric with dashes, max 40 |
data[].source | body | string | — | the repository the kit is forked from |
data[].tier | body | integer | — | Tier is public-gallery curation, carried verbatim from the embedded catalog. |
data[].title | body | string | — | display name |
data[].useCase | body | string | — | what the kit is for, in a phrase |
data[].variants | body | Variant[] | — | the shapes this template ships in |
data[].variants[].framework | body | string | — | only when it differs from the template's |
data[].variants[].id | body | string | — | selector, unique within the template ("react", "grid-3-fluid") |
data[].variants[].kind | body | string | — | the axis it varies: format | page | theme |
data[].variants[].label | body | string | — | human label for the picker |
data[].variants[].source | body | string | — | the repository this shape is forked from; the synthesized default shape carries the template's own |
Failure carries the platform error shape — see Errors.
Examples
hanzo templates listimport { Configuration, TemplateApi } from 'hanzoai';
const api = new TemplateApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getTemplate();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TemplateApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TemplateApi(client).get_template()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.TemplateAPI.GetTemplate(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, template_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = template_api::get_template(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TemplateApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new TemplateApi(client).getTemplate();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/template \
-H "Authorization: Bearer $HANZO_API_KEY"Tool templates, op get_template — 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": "templates",
"arguments": {
"op": "get_template",
"input": {}
}
}
}'How is this guide?