Skip to main content

SDK & CLI

ToothFairyAI ships first-class Node.js and Python libraries for integrating with the platform programmatically (the SDKs) and from the terminal (the CLIs). Both ecosystems mirror the same underlying REST, AI, and streaming APIs that are documented in the API reference.

Packages

There are four packages, published to npm and PyPI:

PackageRegistryInstallVersion
Node.js SDK @toothfairyai/sdknpmnpm install @toothfairyai/sdk@toothfairyai/sdk@latest…
Node.js CLI @toothfairyai/clinpmnpm install -g @toothfairyai/cli@toothfairyai/cli@latest…
Python SDK toothfairyaiPyPIpip install toothfairyaitoothfairyai@latest…
Python CLI toothfairy-cliPyPIpip install toothfairy-clitoothfairy-cli@latest…
Python SDK vs Python CLI

The Python SDK (toothfairyai) and the Python CLI (toothfairy-cli) are separate packages. The CLI ships its own self-contained HTTP client (toothfairy_cli.api) and does not depend on the SDK. If you want to write Python code against the platform, install toothfairyai; if you want the command-line tool, install toothfairy-cli.

SDK vs CLI vs REST API

SDKCLIREST API
Use caseApplication codeTerminal / scripts / CIAny HTTP client
LanguagesNode.js, PythonNode.js, PythonAny
AuthAPI key + workspace ID in client configAPI key + workspace ID via flags/envx-api-key header + workspaceid
StreamingNative event emitters / iteratorsNot supportedRaw SSE
Field docsThis section (per manager)This section (per command)API reference

The field tables on every manager page in this section are sourced directly from the aligned OpenAPI specs, so they match the API reference to the dot.

Where to start