Client SDKs
HVAKR provides official client SDKs that wrap the v0 REST API so you don’t have to construct requests by hand.
Available SDKs
Section titled “Available SDKs”TypeScript / JavaScript
Section titled “TypeScript / JavaScript”For Node.js and browser applications.
npm install @hvakr/clientRepository: https://github.com/flowcircuits/hvakr-client
Python
Section titled “Python”For Python applications and scripts.
pip install hvakrRepository: https://github.com/flowcircuits/hvakr-python
TypeScript SDK
Section titled “TypeScript SDK”Basic usage
Section titled “Basic usage”The client is constructed with an access token (created in Settings → Developer). All methods live directly on the client instance.
import { HVAKRClient } from '@hvakr/client'
const client = new HVAKRClient({ accessToken: process.env.HVAKR_ACCESS_TOKEN! })
// List the projects you can accessconst { projects } = await client.listProjects()
// Fetch a single project (pass true to include all subcollections)const project = await client.getProject('project-id')const fullProject = await client.getProject('project-id', true)
// Run the calculatorconst loads = await client.getProjectOutputs('project-id', 'loads')Methods
Section titled “Methods”Projects
listProjects()— list project summaries you can accessgetProject(id)/getProject(id, expand)— fetch a project;expand: trueinlines all subcollections (spaces, zones, systems, types, graph, reports, …)createProject(data, revitPayload?)— create a project from anExpandedProjectPost, or from a Revit payload whenrevitPayloadistrueupdateProject(id, data, revitPayload?)— partial update; subcollections are deep-merged and anullvalue deletes a fielddeleteProject(id)— soft-delete (requires the OWNER role)
Calculator outputs
getProjectOutputs(id, 'loads')— heating and cooling loads by space, zone, and systemgetProjectOutputs(id, 'register_schedule')— register/diffuser sizing schedulegetProjectOutputs(id, 'dryside_graph')— duct graph with flow rates, sizes, and pressure drops
Weather
searchWeatherStations(latitude, longitude)— IDs of the 5 nearest ASHRAE weather stationsgetWeatherStation(id)— ASHRAE design weather data for a station
Webhooks
Section titled “Webhooks”The SDK ships a helper to verify and parse webhook payloads:
import { constructWebhookEvent } from '@hvakr/client'
const event = constructWebhookEvent({ payload: rawRequestBody, signature: req.headers['x-hvakr-signature'], secret: process.env.HVAKR_WEBHOOK_SECRET!,})Error handling
Section titled “Error handling”Failed requests throw an HVAKRClientError:
import { HVAKRClient, HVAKRClientError } from '@hvakr/client'
try { const project = await client.getProject('id')} catch (error) { if (error instanceof HVAKRClientError) { // error.message describes the API response }}Python SDK
Section titled “Python SDK”The Python client mirrors the same set of operations as the TypeScript client (in snake_case). See the repository for exact signatures.
import osfrom hvakr import HVAKRClient
client = HVAKRClient(access_token=os.environ['HVAKR_ACCESS_TOKEN'])
projects = client.list_projects()project = client.get_project('project-id')loads = client.get_project_outputs('project-id', 'loads')- The SDK request/response types are the same
*_v0Zod schemas the API validates against, so the TypeScript client cannot drift from server-side validation. - For the authoritative request/response shapes, see the live OpenAPI reference at https://api.hvakr.com/v0/docs/.