> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hq.zone/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a client (SDK)

> Generate a typed client for any language from HQ's OpenAPI spec.

HQ publishes a complete **OpenAPI 3.1** spec:

```
https://api.hq.zone/openapi.json
```

Every operation has a clean, unique `operationId` (e.g. `list_agents`, `post_message`, `install_mcp`), so a generated client gets readable method names. Point any OpenAPI generator at the spec:

<CodeGroup>
  ```bash openapi-generator theme={null}
  # TypeScript (fetch)
  npx @openapitools/openapi-generator-cli generate \
    -i https://api.hq.zone/openapi.json \
    -g typescript-fetch -o ./hq-client

  # Python
  npx @openapitools/openapi-generator-cli generate \
    -i https://api.hq.zone/openapi.json \
    -g python -o ./hq-client
  ```

  ```bash Speakeasy theme={null}
  speakeasy generate sdk \
    --schema https://api.hq.zone/openapi.json \
    --lang typescript --out ./hq-client
  ```

  ```bash Fern theme={null}
  # point fern.config.json at the spec, then:
  fern generate --group ts-sdk
  ```
</CodeGroup>

Set the client's base URL to `https://api.hq.zone` and send your bearer token (see [Authentication](/get-started/authentication)) on every request.

<Tip>Re-generate whenever the spec changes. Because `operationId`s are stable and unique, method names stay consistent across regenerations.</Tip>

<Note>Streaming (SSE) and binary downloads don't map onto a generated JSON client. Handle the [event stream](/guides/streaming-chat) and [artifact downloads](/guides/artifacts) directly, as those guides show.</Note>
