AIVAX

CLI tool

The AIVAX CLI operates an AIVAX account from the terminal. It covers the same products as the API, including AI Gateways, RAG collections, chat clients, Batch, Agentic Tests, web search, OCR, generations, conversations, skills, logs, and account settings, without requiring you to write HTTP requests.

The CLI is open source under the MIT license and published on npm as @aivax/cli.

When to use it #

Use the CLI when a person or an agent works with an account interactively or from scripts:

  • inspecting and adjusting gateways, collections, and chat clients without opening the dashboard;
  • importing documents into a collection, or transcribing a long PDF page by page into Markdown or RAG-ready JSONL;
  • creating, starting, and exporting Batch jobs from local files;
  • running Agentic Tests, checking consumption, or reading conversations and logs while debugging;
  • giving a coding agent a compact way to operate AIVAX, since responses are optimized for agents by default.

For application code that serves end users, call the API or an OpenAI-compatible SDK directly instead.

Install #

The CLI requires Node.js 22.19 or newer.

Bash
npm install -g @aivax/cli
aivax auth login

Other package managers also work, such as pnpm add -g @aivax/cli or bun install -g @aivax/cli.

aivax auth login saves an account profile. The access key is kept in the operating system credential store. To link a profile without sharing the account login key, for example when a coding agent sets up the CLI, pass an existing API key instead:

Bash
aivax auth login --api-key <API_KEY> --profile-name <PROFILE_NAME>

For scripts and CI, set the AIVAX_API_KEY environment variable instead of logging in.

What it can do #

Ask a gateway about a local file:

Bash
aivax gateways chat -m <GATEWAY_ID> "Summarize this contract" -f contract.pdf --stream

Search a collection, or transcribe a document and index it:

Bash
aivax rag search --collection <COLLECTION_ID> -q "refund policy" -k 10
aivax ocr document manual.pdf --format jsonl -o manual.jsonl
aivax rag import -c <COLLECTION_ID> -f manual.jsonl

Run a Batch job from a JSONL file and export the results:

Bash
aivax batch items import -w <WORKFLOW_ID> -j <JOB_ID> -f customers.jsonl
aivax batch jobs start -w <WORKFLOW_ID> -j <JOB_ID>
aivax batch jobs export -w <WORKFLOW_ID> -j <JOB_ID> -o results.jsonl

Generate media, search the web, or check spending:

Bash
aivax generate speech -m <MODEL_ID> -t @script.txt -o narration.mp3
aivax web search -q "AI regulation news" --country US
aivax analytics balance

Call any endpoint that has no dedicated command:

Bash
aivax api get /api/v1/notifications/unread/count

Run aivax --help to list every command group, and add --help to any command to see its options. aivax docs reference <ENDPOINT_NAME> shows the API reference for an endpoint without leaving the terminal.

Type to search the documentation.