
aio is the terminal command of the Interweb All in One AI. With it you chat with AI models, generate images, videos and voice, check your balance and set up the MCP server in your tools, without writing code. On this page:
- Install: In one line, on Linux, macOS and Windows, or with npm.
- Log in: The API key and where it is saved.
- Commands: Balance, models, chat, generations, status and MCP, with examples.
- Environment variables: Change the key, the models and the language without options.
- Sandbox, Cost and Errors: Free tests, credits and what to do when something fails.
Install
aio is a single file with no dependencies and needs Node.js 18 or later. The current version is 1.0.0.
Requirements
- Node.js 18 or later. Check with
node --version. If you do not have it, install the LTS version from the official Node.js site. - An API key with the
ai:readandai:writepermissions, created in the API Center. See Permissions. - AI credits or an active Coding Plan in All in One AI, for the
prod_key.
Linux and macOS
curl -fsSL https://docs.interweb.co.mz/cli/install.sh | shThe installer checks the Node.js version, downloads aio over https, checks the SHA256 and installs it in ~/.local/bin/aio. It never asks for sudo. If the ~/.local/bin folder is not in your PATH, the installer shows the line to add to ~/.bashrc or ~/.zshrc.
Windows
In PowerShell:
irm https://docs.interweb.co.mz/cli/install.ps1 | iexThe installer runs the same checks, installs aio in %LOCALAPPDATA%\aio and adds that folder to your user PATH, without administrator rights. Close and reopen any terminals that were already open.
With npm
npm install -g https://docs.interweb.co.mz/cli/aio-1.0.0.tgzIf npm asks for administrator rights to install global packages, use the installer above, which does not need them.
Files and SHA256
All the files are in https://docs.interweb.co.mz/cli/:
| File | What it is |
|---|---|
| aio.js | The command, in a single file. |
| aio-1.0.0.tgz | The package for npm. |
| install.sh | The installer for Linux and macOS. |
| install.ps1 | The installer for Windows. |
| SHA256SUMS | The SHA256 sums of all the files. |
You can read the installers before running them. To check aio.js by hand:
curl -fsSLO https://docs.interweb.co.mz/cli/aio.js
curl -fsSLO https://docs.interweb.co.mz/cli/SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMSOn macOS, use shasum -a 256 aio.js and compare the result with the aio.js line in SHA256SUMS.
Update and uninstall
To update, run the install command again: the new file replaces the old one. To uninstall:
curl -fsSL https://docs.interweb.co.mz/cli/install.sh | sh -s -- --uninstallOn Windows, use & ([scriptblock]::Create((irm https://docs.interweb.co.mz/cli/install.ps1))) -Uninstall. If you installed with npm, use npm uninstall -g aio-cli. The saved key is not deleted: see Log in.
Log in
aio auth loginaio asks for the key (prod_... or sandbox_...) without showing it on screen, checks it with the API and saves it in ~/.config/aio/config.json, which only your user can read. On Windows, it goes in %APPDATA%\aio\config.json.
aio auth statusshows the key in use (hidden), where it comes from, the mode and the balance.aio auth logoutdeletes the saved key.- The
AIO_API_KEYvariable takes priority over the saved key. It is the simplest way on a server or in a CI pipeline.
The key never appears in the messages or errors of aio. The command already has the Interweb API address, https://api.interweb.co.mz.
Commands
Every command accepts --json, to use the response in another program, and --help, to see its options. aio help shows the full list.
Balance
aio balanceShows your AI credits and, with a Coding Plan, the points left this week and this month, the reset dates and whether credits are used when the plan points run out.
Models
aio models --type image
aio models --search kimi
aio model moonshotai/kimi-k2.7-codeaio modelslists the models in a table, with the type, the name and the price in credits. Filter with--type text|image|video|audio|agentand search with--search.aio model <id>shows one model. For image, video and voice models, it also shows the input fields you can use with--opt.
Chat
aio chat "Explain what an MX DNS record is"
aio chat "Write a slogan for a bakery" --model deepseek-ai/deepseek-v4-flash --max-tokens 300
cat prompt.txt | aio chat
aio chat- The answer appears bit by bit, as the model writes it. Use
--no-streamto get it all at once. --systemgives the model instructions, for example--system "Answer in English".--max-tokenslimits the length of the answer.- Without a prompt in quotes, the text that comes from stdin (
|) is the prompt. - Without a prompt or stdin,
aio chatopens a chat in the terminal:/resetstarts over, and/exitorCtrl+Cquits. - At the end,
aioshows the input and output tokens. The default model appears inaio help chat.
Generate images, videos and voice
aio generate image "a lighthouse at sunset" --opt size=1024x1024 --out images/
aio generate video "waves crashing on the rocks" --model <id>
aio generate audio "Welcome to our support service" --out welcome.mp3aiosends the request, shows a progress indicator while it waits, downloads the files to--out(or the current folder) and shows the cost.--opt key=valuefills in the model fields and can be repeated. See the fields withaio model <id>.--modelchooses the model. Without it,aiouses the default model of each type, the same as the MCP server.--no-waitonly sends the request and shows the id.--timeoutchanges the waiting time, in seconds: by default, 300 for images and voice and 900 for videos.
Generation status
aio status <id>
aio status <id> --download --out videos/Shows the status (processing, completed or failed), the model, the file addresses and the cost. With --download, it downloads the files of a completed generation.
MCP
aio mcp install claude
aio mcp install codex
aio mcp install cursorShows the command or the config block to add the interweb-ai MCP server (https://api.interweb.co.mz/mcp) to each tool, with the key hidden. For Claude Code, aio only runs claude mcp add if you confirm (or with --yes). For Codex and Cursor, the key comes from the AIO_API_KEY variable. Use --show-key to see the full key. What the MCP tools do is in MCP.
Help and version
aio helpshows every command, andaio help <command>the options of one command.aio --versionshows the version, the brand and the API address.
Environment variables
| Variable | What it is for |
|---|---|
AIO_API_KEY | The API key. It takes priority over the saved key. |
AIO_BASE_URL | Another API address. You do not need to change it: by default, it is https://api.interweb.co.mz. |
AIO_MODEL | The aio chat model, when you do not use --model. |
AIO_IMAGE_MODEL, AIO_VIDEO_MODEL, AIO_AUDIO_MODEL | The aio generate model of each type. |
AIO_LANG | The language of the messages: pt or en. Without it, aio follows the system LANG. |
AIO_CONFIG_DIR | Another folder for the settings. |
AIO_TIMEOUT | The waiting time for each API request, in seconds (by default, 120). |
AIO_POLL_SECONDS | How many seconds aio waits between checks of a generation. |
NO_COLOR | Turns off colors and bold in the terminal, like the --no-color option. |
Sandbox
With a sandbox_ key, aio works the same way, but no model is called and nothing is charged:
aio chatalways answersResposta de teste (sandbox).- A generation is completed at once, with a sample file and
0credits. - The model list, the prices and the balance are the real ones.
Use it to try the commands and your scripts. Then log in with the prod_ key. See Sandbox and Production.
Cost
aiois free. You only pay for what you use of the AI API, at the same prices.aio balance,aio models,aio modelandaio statusdo not spend credits.- In
aio chat, tokens are paid at the model price, as in How chat is charged. With a Coding Plan, the plan models spend points instead of credits. - In
aio generate, we reserve the credits with the request, charge the real cost at the end and return the rest. A generation that fails costs nothing.
Each command counts towards the 90 requests per minute limit of the key and appears in the All in One AI history.
Errors
aio shows the error in the terminal language, with the code, the HTTP status and the request id, to give to support. It exits with code 0 when all goes well, 1 when there is an error and 2 when the command is written wrong.
| Situation | What to do |
|---|---|
| There is no API key. | Run aio auth login or set the AIO_API_KEY variable. |
The API rejected the key (401). | Check the key in the API Center: it may be revoked or belong to another account. |
The key does not have ai:read or ai:write (403). | Create a key with both permissions. |
There are not enough credits (402). | Buy credits in All in One AI or choose a cheaper model. |
The model does not exist (404). | Look up the id with aio models --search. |
You went over the requests per minute limit (429). | Wait a little and run the command again. |
| The generation did not finish within the waiting time. | Check it later with aio status <id> --download. |
| aio needs Node.js 18 or later. | Update Node.js and run the command again. |
The full list of codes is in Errors.