AiChat CLI
A command-line tool for AI Dialogue via the AceDataCloud platform.
Get your Ace Data Cloud API key
- Open Ace Data Cloud → Applications. Sign in, or register an account first.
- Find General application. If it has not been created, choose Initialize General Application. A general key can use the services available to your account; a dedicated application's key is limited to its service. Check the required service/model access and current pricing.
- Copy the API Key from the application card, or open Keys / Manage Keys → Create to create a separate key for this integration. Give it a recognizable name so you can revoke or rotate it independently.
- When creating a key, review Expiration Time, Set Usage Limitation, and Allowed APIs. Enable only the restrictions you need, allow the operations you will call, then click Create and copy the token from the key list. Task lookup does not grant permission to submit a generation. Confirm the application's balance can cover your first request; any trial allowance is whatever your account currently displays.
- Copy only the token value, without quotation marks, spaces, or
Bearer. An API Key / API Token field expects this raw value; only a manually configured HTTPAuthorizationheader needs theBearerprefix. Aplatform-...account-management token cannot replace a generation API key.
Save the key in the client's credential store or the environment variable shown below. Never put it in a prompt, shared workflow, screenshot, or Git commit. If authentication fails, check the full copied value, application/service access, expiration, usage limit, and balance before creating another key.
Features
- Chat with AI — Send questions to GPT, DeepSeek, Grok, GLM, and more models
- Conversation Continuation — Resume conversations using
--id - Stateful Sessions — Enable multi-turn context with
--stateful - References — Inject context documents into prompts with
--ref - Rich Output — Beautiful terminal formatting with
--jsonfor scripting - Many Models — GPT-5, GPT-4o, o3, o4-mini, DeepSeek, Grok, GLM, and more
Installation
pip install aichat-pro-cli
Quick Start
# Set your API token
export ACEDATACLOUD_API_TOKEN=your_token_here
# Ask a question
aichat chat "What is the capital of France?"
# Use a specific model
aichat chat "Explain quantum computing" -m gpt-4o
# Continue a conversation
aichat chat "Tell me more" --id 64a67fff-61dc-4801-8339-2c69334c61d6
# Stateful conversation (server remembers context)
aichat chat "My name is Alice" --stateful
aichat chat "What is my name?" --id <returned-id> --stateful
# With reference documents
aichat chat "Summarize this" --ref "https://example.com/doc.txt"
# Get JSON output
aichat chat "Hello" --json | jq '.answer'
Commands
| Command | Description |
|---|---|
chat |
Send a question to an AI model (/aichat/conversations) |
chat2 |
Send a conversation request with structured messages and tool results (/aichat2/conversations) |
models |
List all available models |
models2 |
List models available to chat2 |
config |
Show current configuration |
Chat Options
| Option | Description |
|---|---|
-m, --model |
Model to use (default: gpt-4o) |
--id |
Conversation ID to continue |
--preset |
Preset model name |
--stateful |
Enable stateful conversation |
--ref |
Reference URL or text (repeatable) |
--json |
Output raw JSON |
Chat2 Turn Limit
aichat chat2 --max-turns accepts integers from 1 to 500 and limits agent
iterations (model calls), not conversation history. When omitted, the CLI leaves
max_turns out of the request and the server defaults to 500. Each model call is
billed by actual usage; a higher limit allows longer tool chains.
Set the limit to 1 for a single answer without tool calls:
aichat chat2 "Explain quantum computing" --max-turns 1
Configuration
| Environment Variable | Description | Default |
|---|---|---|
ACEDATACLOUD_API_TOKEN |
API authentication token | (required) |
ACEDATACLOUD_API_BASE_URL |
API base URL | https://api.acedata.cloud |
AICHAT_REQUEST_TIMEOUT |
Request timeout in seconds | 30 |
You can also use a .env file or pass --token directly.
Docker
docker compose run aichat-cli chat "Hello!"
Development
# Install with dev dependencies
pip install -e ".[all]"
# Run tests
pytest
# Run linter
ruff check .
ruff format --check .
License
MIT License - see LICENSE for details.
Links
Metadata
Release files for aichat-pro-cli 2026.10.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aichat_pro_cli-2026.10.12.0.tar.gz | 15.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aichat_pro_cli-2026.10.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / aichat_pro_cli-2026.10.12.0.tar.gz
| Download URL | aichat_pro_cli-2026.10.12.0.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae7875a5e690b0dff042c799875354cc91a3231bcf48df7937d51bd0fdd70040
|
|
BLAKE2b-256 checksum How to use checksums |
1e6c710fd6e8a62ca6218b482d9840ad82ea51ef6a88afa0913f17ee667a7819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aichat_pro_cli-2026.10.12.0-py3-none-any.whl
| Download URL | aichat_pro_cli-2026.10.12.0-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03dae5cef97de1ac9784f5caf13657e01baf712d8da3bf012039fc8d07283dc0
|
|
BLAKE2b-256 checksum How to use checksums |
2e54596611dd1326fd91dd2d1633798bfbcf339e31e9397b3caeac1b68d02822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|