List models — GET /v1/models
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 says so: the authz filter lists "models" as public, filter_balance does not gate it, 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.
A credential that is presented is verified, never merely shape-checked: a caller using /v1/models to ask "is my key working?" gets an honest answer, because a key that does not verify annotates nothing rather than reading as accepted.
Request
GET /v1/models takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | ai.ModelList | Success. |
401 | — | No credential, or one this service does not accept. |
403 | — | A valid credential that may not do this. |
200 body — 55 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | ai.ModelInfo[] | — | |
data[].access | body | ai.ModelAccessInfo | — | |
data[].access.state | body | string | — | |
data[].canonical_slug | body | string | — | |
data[].class | body | string | — | |
data[].context_window | body | integer | — | |
data[].created | body | integer | — | |
data[].description | body | string | — | |
data[].family | body | string | — | |
data[].id | body | string | — | |
data[].inputs | body | string[] | — | |
data[].max_output_tokens | body | integer | — | |
data[].name | body | string | — | |
data[].object | body | string | — | |
data[].outputs | body | string[] | — | |
data[].owned_by | body | string | — | |
data[].premium | body | boolean | — | |
data[].pricing | body | ai.ModelPricingInfo | — | |
data[].pricing.completion | body | string | — | |
data[].pricing.input_per_million | body | number | — | |
data[].pricing.output_per_million | body | number | — | |
data[].pricing.prompt | body | string | — | |
data[].pricing.variable | body | boolean | — | |
data[].provider | body | string | — | |
data[].supports_reasoning | body | boolean | — | |
data[].supports_tools | body | boolean | — | |
data[].supports_vision | body | boolean | — | |
models | body | ai.ModelInfo[] | — | |
models[].access | body | ai.ModelAccessInfo | — | |
models[].access.state | body | string | — | |
models[].canonical_slug | body | string | — | |
models[].class | body | string | — | |
models[].context_window | body | integer | — | |
models[].created | body | integer | — | |
models[].description | body | string | — | |
models[].family | body | string | — | |
models[].id | body | string | — | |
models[].inputs | body | string[] | — | |
models[].max_output_tokens | body | integer | — | |
models[].name | body | string | — | |
models[].object | body | string | — | |
models[].outputs | body | string[] | — | |
models[].owned_by | body | string | — | |
models[].premium | body | boolean | — | |
models[].pricing | body | ai.ModelPricingInfo | — | |
models[].pricing.completion | body | string | — | |
models[].pricing.input_per_million | body | number | — | |
models[].pricing.output_per_million | body | number | — | |
models[].pricing.prompt | body | string | — | |
models[].pricing.variable | body | boolean | — | |
models[].provider | body | string | — | |
models[].supports_reasoning | body | boolean | — | |
models[].supports_tools | body | boolean | — | |
models[].supports_vision | body | boolean | — | |
object | body | string | — |
Failure carries the platform error shape — 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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.AiAPI.GetModels(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::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.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new AiApi(client).getModels();curl https://api.hanzo.ai/v1/models \
-H "Authorization: Bearer $HANZO_API_KEY"MCP declares no tool for ai — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.