Returns the list of available models from the routing table.
Returns the list of available models from the routing table.
GET /v1/models
| Address | https://api.hanzo.ai/v1/models |
| Method | GET |
| Operation | get_models |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the list of available models from the routing table.
PUBLIC BY DESIGN, AND IT DOES NOT AUTHENTICATE — that is the whole contract, so it is stated here rather than left to be inferred. The catalogue is the same for everyone (listAvailableModels takes no principal), docs.hanzo.ai fetches it from the browser, and every policy layer around it already says so out loud: the authz filter lists "models" as public, filter_balance refuses to gate it (a 402 here was a console-wide outage), the rate limiter excludes it, and cloud's spend.Reachable carries /v1/models/ as "the model catalog the shell reads for discovery".
SO THE Authorization HEADER IS NOT AN ADMISSION CHECK HERE. It is read for ONE thing — annotating gated SKUs with the caller's own access standing — and annotation degrades to nothing when there is no verified principal.
It used to hold a "require authentication" gate that authenticated nobody: it
rejected an ABSENT credential and a MALFORMED one, then accepted any string that
merely looked like a key. Bearer sk- followed by 36 zeroes returned 200 in
production; so did a JWT three days expired. It was a shape check wearing an auth
check's clothes, and its cost was diagnostic: /v1/models is the natural "is my auth
working?" probe, and answering 200 to a dead credential sent people debugging the
wrong system. A public endpoint must not appear to validate. Either check the
credential or ignore it — this one ignores it, deliberately and visibly.
Removing that gate discloses nothing new: the catalogue was already reachable by anyone willing to type three characters, so there is no confidentiality delta, only an honesty one.
Request
GET /v1/models takes no parameters and no body — the credential is the whole request.
Response
The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.
Examples
hanzo models listimport { Configuration, AiApi } from 'hanzoai';
const api = new AiApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getModels();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AiApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AiApi(client).get_models()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.AiAPI.GetModels(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, ai_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = ai_api::get_models(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AiApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new AiApi(client).getModels();curl https://api.hanzo.ai/v1/models \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches ai through the ai tool, which names its 294 operations with its own verbs — this one among them, under a name only the door 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_models"
}
}
}'How is this guide?