Skip to main content

Requirements

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

Installing the package

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

Installing the command-line tool

The kardinal command ships with both packages, behind an optional dependency.
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

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.

Verifying the installation

With KARDINAL_API_KEY set (see Client configuration), the command-line tool checks the key against the API without creating anything:
It confirms the key works, and shows the host and the agency it belongs to. Without the command-line tool, run the quickstart instead: with a sandbox key, it consumes no credits.