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:
| Package | Registry | Install | Version |
|---|---|---|---|
Node.js SDK @toothfairyai/sdk | npm | npm install @toothfairyai/sdk | @toothfairyai/sdk@latest… |
Node.js CLI @toothfairyai/cli | npm | npm install -g @toothfairyai/cli | @toothfairyai/cli@latest… |
Python SDK toothfairyai | PyPI | pip install toothfairyai | toothfairyai@latest… |
Python CLI toothfairy-cli | PyPI | pip install toothfairy-cli | toothfairy-cli@latest… |
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
| SDK | CLI | REST API | |
|---|---|---|---|
| Use case | Application code | Terminal / scripts / CI | Any HTTP client |
| Languages | Node.js, Python | Node.js, Python | Any |
| Auth | API key + workspace ID in client config | API key + workspace ID via flags/env | x-api-key header + workspaceid |
| Streaming | Native event emitters / iterators | Not supported | Raw SSE |
| Field docs | This 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
- Install → Installation
- Configure a client → Authentication & routing
- Errors → Error handling
- Node.js SDK → Node.js overview
- Python SDK → Python overview
- CLIs → Node CLI overview · Python CLI overview