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.
- In General application → API KEY, click the copy button marked 1 below. Use the raw token value without quotes, spaces or
Bearer. Aplatform-...account-management token cannot replace it.
Check the key's service access and balance before submitting; task lookup permission alone does not permit generation. See the detailed key guide (English).
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
export ACEDATACLOUD_API_TOKEN=YOUR_API_TOKEN
aichat chat2 "用一句话介绍下 AceDataCloud。" --model gpt-5.4 --max-turns 1 --json
Documented successful response excerpt from the conversation v2 guide (English); the Chinese prompt asks for a one-sentence platform introduction, and generated text varies:
{
"answer": "AceDataCloud 是一个聚合主流 AI 模型与多模态服务的统一 API 平台,开发者通过一个密钥即可调用 GPT、Claude、Gemini、Midjourney、Suno、Veo 等多家服务。"
}
Read answer. The legacy chat protocol and the newer chat2 model catalog are separate.
More examples
# 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'
Unified Chat Completions
aichat completions "Hello" --model kimi-k2.7-code
aichat completions "Explain this" --model gemini-4-argon --json
completions calls /v1/chat/completions with an explicit model ID and Bearer authentication. It does not restrict you to the legacy chat or chat2 command's per-API model suggestions. No model or token limit is silently selected: --max-completion-tokens is optional and only sent when provided. Use messages below for a model that only publishes a Messages endpoint. The commands do not fall back to another protocol.
Native Messages models
Install the existing published package with pip install -U aichat-pro-cli. Models such as claude-sonnet-5-5 require the native Messages protocol:
aichat messages "Hello" --model claude-sonnet-5-5 --max-tokens 128
aichat messages "Summarize this" --model claude-opus-5-5 --max-tokens 128 --json
The command makes one non-streaming request to /v1/messages with your configured Bearer token. A model ID is required and passed through unchanged; no old client-side allowlist prevents newly published Messages models, and no alternate model or protocol is tried. Check the model's published protocol and current pricing before use. --system sets a system prompt and --json preserves the full native response, including tool or usage fields. The existing chat, chat2, models, and models2 commands retain their behavior; their per-API model lists are not the complete cross-protocol catalog.
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 |
Kimi in Chat2
Use kimi-k3.1-pro through chat2; kimi-k3, kimi-k2.6 and
kimi-k2.7-code are also available. K2.7 Code targets coding and tool calls
at K2.6-tier pricing. K2.5 and the K2 Thinking variants are retired on chat2.
Run aichat models2 for this endpoint's list; the legacy chat catalog is separate.
See the AiChat v2 guide (English).
aichat chat2 "Review this code and suggest a fix" -m kimi-k3.1-pro --max-turns 1
Gemini 4 Argon in Chat2
gemini-4-argon, gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen are available through chat2, not chat. The model defaults are unchanged; aichat models2 lists the choices for this endpoint.
aichat chat2 "Review this design and its tradeoffs" -m gemini-4-argon --max-turns 1
Claude Fable 5.2 in Chat2
Use the full model ID claude-fable-5-2 through chat2, not chat. Fable 5.1 and Fable 5 remain separate choices; defaults are unchanged. aichat models2 lists the models for this endpoint. Check current model pricing and account access before submitting:
aichat chat2 "Review this design and its tradeoffs" -m claude-fable-5-2 --max-turns 1 --json
For native Claude thinking blocks and tool controls, use the Claude CLI's Messages command instead; Chat2 uses its own conversation format.
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
MiMo
The model lists include mimo-v2.6-pro and mimo-v2.6-flash. Verify the live model catalog, service status and your account access before using chat or chat2 with either ID. Initial scope is text, reasoning and function tools. Command-line model discovery does not grant service access or confirm live availability.
Metadata
Release files for aichat-pro-cli 2026.11.29.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 | Provenance | Actions |
|---|---|---|---|---|
| aichat_pro_cli-2026.11.29.0.tar.gz | 22.5 kB | Without provenance | Details for aichat_pro_cli-2026.11.29.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aichat_pro_cli-2026.11.29.0-py3-none-any.whl | Python 3 | none | any | Details for aichat_pro_cli-2026.11.29.0-py3-none-any.whl |
Total release size: 40.6 kB
Release files / aichat_pro_cli-2026.11.29.0.tar.gz
| Download URL | aichat_pro_cli-2026.11.29.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34167793dd694e072307d66a88662b26b3e106459dd579ab65c4c44c1c51d240
|
|
BLAKE2b-256 checksum How to use checksums |
af31934787b256a1e2efffb819fec645675262156709ddfd1faaec7f1544ed9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / aichat_pro_cli-2026.11.29.0-py3-none-any.whl
| Download URL | aichat_pro_cli-2026.11.29.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d3ea95e2b7899328f9d8ffff31ba3d5ca8d8b5120ba58cb037a26f7507228f7
|
|
BLAKE2b-256 checksum How to use checksums |
a94e8c293b41c9f327ffa78d0851333bdafe12355f4ee42ddffc09adf26f6c27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for aichat-pro-cli 2026.11.29.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.