zoo-github-actions-auth[bot] 4614a25ac6 Update api spec (#335)
* YOYO NEW API SPEC!

* fix

* get_api_call_metrics has been removed. it is empty now

* fix

* Generated new lib

* 2.0.41

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Ammann <max.ammann@zoo.dev>
2025-07-04 15:13:56 +02:00
2025-07-04 15:13:56 +02:00
2025-07-04 15:13:56 +02:00
2022-08-01 20:06:14 +10:00
2024-09-05 14:31:08 -04:00
2022-08-01 14:27:11 +10:00
2022-08-01 14:27:11 +10:00
2024-09-05 14:31:08 -04:00
2022-08-01 14:27:11 +10:00
2024-08-14 13:08:07 -07:00
2024-10-11 12:45:04 -04:00
2024-10-11 12:45:04 -04:00
2024-10-11 12:45:04 -04:00
2024-10-11 12:45:04 -04:00
2022-12-12 11:09:58 +11:00
2022-08-01 14:27:11 +10:00
2024-09-05 14:31:08 -04:00
2024-09-05 14:31:08 -04:00
2025-07-04 15:13:56 +02:00
2022-08-01 14:27:11 +10:00
2025-07-04 15:13:56 +02:00
2024-10-03 10:57:45 -04:00
2024-08-14 13:08:07 -07:00
2025-07-04 15:13:56 +02:00

KittyCAD JS/TS API library

Fully typed js library, compatible with js and ts.

Please see CONTRIBUTING.md for how to to publish AND AN EXPLANATION BEHIND THE DERIVATION PROCESS!

Full documentation here

Simple example below.

Install

npm install @kittycad/lib
# or
yarn add @kittycad/lib

## set your token
export KITTYCAD_TOKEN=<your token>

Basic example

import { file } from '@kittycad/lib';
import fsp from 'fs/promises';

async function main() {
    // zoo.dev/docs/api/get-cad-file-mass?lang=typescript
    const response = await file.create_file_mass({
      src_format: 'obj',
      material_density_unit: 'kg:m3',
      output_unit: 'g',
      material_density: 0.007,
      body: await fsp.readFile('./example.obj', 'base64'),
    })
    if ('error_code' in response) throw 'error'

    const { status, mass } = response
    console.log(status, mass);
}

main();
Description
The TypeScript API client for Zoo.
Readme MIT 2.3 MiB
Languages
TypeScript 99.3%
Go 0.2%
Nix 0.2%
JavaScript 0.2%
Shell 0.1%