# List commands

URL: https://docs.hanzo.ai/docs/openapi/openapi/get-openapi-commands

> The command projection of the OpenAPI document at /v1/openapi.json — each operation reduced to what running it by name needs: its service and command token, its method and path, the prose lifted from the handler, its path parameters as positional arguments and its remaining inputs as typed flags.

`GET /v1/openapi/commands`

> [OpenAPI →](https://docs.hanzo.ai/docs/openapi/openapi) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                            |
| ------------- | ------------------------------------------ |
| **Address**   | `https://api.hanzo.ai/v1/openapi/commands` |
| **Method**    | `GET`                                      |
| **Operation** | `get_openapi_commands`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`     |

The command projection of the OpenAPI document at /v1/openapi.json — each operation reduced to what running it by name needs: its service and command token, its method and path, the prose lifted from the handler, its path parameters as positional arguments and its remaining inputs as typed flags.

It is a separate address for one measured reason: the fleet document is megabytes and a command palette cannot load it, while this projection of the same operations is several times smaller because it carries no schemas, responses or components.

Unauthenticated by design, exactly as the document it derives from: a client has to be able to read the contract before it holds a credential, and a list of operation names grants nothing. The list is TOTAL and is never filtered by caller — what you may run is decided per request by the authorizer, on the decoded input, so a filtered list would be a second claim about permission that is free to be wrong.

Rendered once and served as bytes thereafter, under a strong ETag.

## Request

`GET /v1/openapi/commands` 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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo openapi commands
```

**SDK**

**.ts**

```ts
import { Configuration, OpenapiApi } from 'hanzoai';

const api = new OpenapiApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getOpenapiCommands();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import OpenapiApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = OpenapiApi(client).get_openapi_commands()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.OpenapiAPI.GetOpenapiCommands(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, openapi_api};

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

let result = openapi_api::get_openapi_commands(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.OpenapiApi;

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

var result = new OpenapiApi(client).getOpenapiCommands();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/openapi/commands \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP declares no tool for **openapi** — `tools/list` on `https://api.hanzo.ai/v1/mcp` names the products it does reach. Use HTTP or an SDK.

---

[OpenAPI API](https://docs.hanzo.ai/docs/openapi/openapi) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
