The aio command (api-cli): AI chat, images, models and MCP setup from your terminal

API & DocumentationSDKs, CLI & Libraries·· 114 views· 3 min read

aio is our command for the terminal. It chats with the AI, generates images, shows the models and your balance, and helps you set up the MCP server for Claude Code, Codex or Cursor. It is for developers who prefer the command line.

What it does

aio balance shows your credits and plan. aio models lists the models, and aio model <id> shows the input fields of a media model.

aio chat opens a chat in the terminal, with a streamed answer. aio generate image generates images, and aio status <id> --download fetches the result.

aio mcp install claude, aio mcp install codex and aio mcp install cursor give each tool what it needs for the MCP server: the command for Claude Code, and the config block for Codex and Cursor.

What you need

Node.js 18 or later, and an API key from your MozOut account, created in the API Center of My MozOut.

Installing, step by step

1 Check that you have Node.js 18 or later.
2 Install aio with one line: curl -fsSL https://docs.mozout.com/cli/install.sh | sh. On Windows, follow the aio guide.
3 Run aio auth login and paste the key. aio checks it and saves it.
4 Try it: aio chat "Explain what DNS is".
Use Homebrew? You can also install aio with brew: see the Homebrew tap.

The API key

The key is kept in ~/.config/aio/config.json (on Windows, %APPDATA%\aio\config.json) and never shows in messages. The AIO_API_KEY variable takes priority over the saved key.

aio auth status shows the key in use (hidden), the mode and the balance. aio auth logout deletes the saved key. See how to create a key.

Testing without spending

With a sandbox_ key nothing is charged: answers are test answers.

Good to know

Variables: besides AIO_API_KEY, there are AIO_BASE_URL, AIO_MODEL and AIO_LANG (pt or en).

Exit codes: 0 success, 1 error, 2 wrong usage. Handy in scripts: see aio on a server or in scripts.

Claude Code: aio mcp install claude shows the command and asks before running it.

Help

The most common errors are in aio errors. If yours is not there, open a support ticket and tell us the command and the message. The code is in the api-cli repository, under the MIT license.

Ready to use AI in your terminal?

Download the latest release

SEE ALSO

The aio command: AI in your terminal

Updating or uninstalling aio

Setting up the MCP server with aio mcp install

The repository on MozOut Git

SDKs and integrations, in the API documentation

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from R118.80/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.