Skip to main content
The Maitai CLI lets you manage Maitai product resources from the terminal — applications, intents, agents, workflows, datasets, test sets, finetune runs, sentinels, analytics, and more. It wraps the API Reference (/api/v1).

Install

pip install maitai-cli

Authenticate

Create an API key in the Portal under Settings → API Keys, then:
# Interactive: saves key to ~/.maitai/config
maitai login --api-key YOUR_MAITAI_API_KEY

# Or use environment variable (no login needed)
export MAITAI_API_KEY="YOUR_MAITAI_API_KEY"

Quick usage

# Check auth status
maitai whoami

# List resources
maitai applications --list
maitai agents --list
maitai intent-groups --list
maitai workflows --list
maitai datasets --list
maitai test-sets --list

# Get by ID
maitai applications --get 42
maitai agents --get 1

# Raw API calls (any endpoint)
maitai api GET /applications
maitai api POST /applications -b '{"application_name":"Test","application_ref_name":"test"}'
maitai api POST /workflows/123/versions -b '{"bump_type":"minor"}'

Base URL

  • Production: https://api.trymaitai.ai/api/v1
  • Override with MAITAI_BASE_URL or maitai login --base-url

Response format

  • Success: {"data": {...}}
  • Paginated: {"data": [...], "pagination": {"total": N, "offset": 0, "limit": 25}}
  • Error: {"error": {"status": 401, "message": "..."}}

Command reference

See Commands for the full list of resource commands and options. For coverage details and intentionally excluded Portal/admin surfaces, see API Coverage.