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

> ## Agent Instructions
> If you're integrating Kardinal into an application with an SDK, start with Integration paths: https://developers.kardinal.ai/getting-started/integration-paths.md. It lists the sections to read, in order. If you follow Integration paths, you don't need llms-full.txt or openapi.yaml. Each step links the section you need.

# Install the Python and TypeScript SDKs

> Install the Kardinal Python or TypeScript SDK and its optional kardinal command-line tool, check the supported runtimes, and verify that the setup works.

## Requirements

> [tab] Python
>
> Python 3.10 or later. The package depends on `pydantic` and `httpx` only; the command-line tool adds `Typer`.

> [tab] TypeScript
>
> Node.js 22 or later. The package depends on `zod` only; the command-line tool adds `commander`.

## Installing the package

Install the Python package in a virtual environment, which is a private folder of packages for one project. On Homebrew Python and on recent Debian and Ubuntu, `pip install` outside a virtual environment fails with an `externally-managed-environment` error. On Debian and Ubuntu, `python3 -m venv` needs the `python3-venv` package.

```bash Python theme={null}
python3 -m venv .venv
source .venv/bin/activate   # on Windows: .venv\Scripts\activate
pip install kardinal-ai
```

```bash TypeScript theme={null}
npm install @kardinal-ai/sdk
```

The Python package is published as `kardinal-ai` but imports as `kardinal`: `from kardinal import Kardinal`.

## Installing the command-line tool

The [`kardinal` command](https://developers.kardinal.ai/sdks/cli) ships with both packages, behind an optional dependency.

```bash Python theme={null}
pip install "kardinal-ai[cli]"   # in your project's environment
pipx install "kardinal-ai[cli]"  # or as a standalone command
```

```bash TypeScript theme={null}
npm install @kardinal-ai/sdk commander   # in your project
npm install -g @kardinal-ai/sdk commander  # or as a global command
```

Both commands are the same tool, with the same subcommands and output: install whichever matches the runtime you already have. A developer working in TypeScript can also use the Python one, and the reverse.

## Supported runtimes

> [tab] Python
>
> The client is synchronous: every method returns once its HTTP call is done. The package ships its type hints (`py.typed`), so a type checker such as mypy or Pyright, and your editor, see the types of every model and method.

> [tab] TypeScript
>
> The package is an ES module, with its type declarations included: load it with `import`. Every method returns a `Promise`, except `plans.iterAll`, an async iterator. Requests go through the `fetch` built into Node.js.
>
> > [!WARNING]
> >
> > **The TypeScript SDK targets Node.js only, not browsers.** An API key gives full access to its agency's plans and is valid for a year: it must stay on a server. Never ship it in a front-end bundle, which includes any environment variable a framework exposes to the browser, such as those prefixed with `NEXT_PUBLIC_`, `VITE_`, or `PUBLIC_`. See [Keeping the key server-side](https://developers.kardinal.ai/sdks/configuration.md#keeping-the-key-server-side).

## Verifying the installation

With `KARDINAL_API_KEY` set (see [Client configuration](https://developers.kardinal.ai/sdks/configuration.md)), the command-line tool checks the key against the API without creating anything:

```bash theme={null}
kardinal auth check
```

It confirms the key works, and shows the host and the agency it belongs to. Without the command-line tool, run the [quickstart](https://developers.kardinal.ai/sdks/quickstart.md) instead: with a sandbox key, it consumes no credits.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.