Vigiar
1
0
Derivar
Você já tinha feito uma derivação do repositório api-cli, anteriormente
0
api-cli/README.md

54 linhas
2,2 KiB
Markdown

<p align="center"><img src="assets/logo.png" alt="Interweb" width="280"></p>
# aio: Interweb All in One AI
<!-- badges:start -->
[![Release](https://git.interweb.co.mz/interweb-mz/api-cli/badges/release.svg)](https://git.interweb.co.mz/interweb-mz/api-cli/releases) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
<!-- badges:end -->
[Português](README-pt.md)
Needs Node.js 18 or later. Install:
```sh
curl -fsSL https://docs.interweb.co.mz/cli/install.sh | sh
```
Commands:
```sh
aio auth login # asks for the key, checks it and saves it (chmod 600)
aio auth status # key in use (hidden), mode and balance
aio auth logout # deletes the saved key
aio balance # credits and plan
aio models --type image --search flux
aio model <id> # input fields of a media model
aio chat "Explain what DNS is" # streamed answer
aio chat # interactive chat (Ctrl+C quits)
aio generate image "a lighthouse at sunset" --opt size=1024x1024 --out images/
aio status <id> --download
aio mcp install claude # command for Claude Code (asks before running)
aio mcp install codex # block for ~/.codex/config.toml
aio mcp install cursor # block for mcp.json
```
Variables: `AIO_API_KEY` (takes priority over the saved key), `AIO_BASE_URL`, `AIO_MODEL`, `AIO_LANG` (pt or en).
The key is kept in `~/.config/aio/config.json` (on Windows, `%APPDATA%\aio\config.json`) and never shows in messages.
With a `sandbox_` key nothing is charged: answers are test answers.
Exit codes: 0 success, 1 error, 2 wrong usage.
## Build por marca / Per-brand build
```sh
node scripts/build.js --base https://api.interweb.co.mz --brand "Interweb" --out dist/api.interweb.co.mz/
node --test test/aio.test.js
```
O build grava o endereço e a marca no `aio.js` e gera `aio-<versão>.tgz` e `SHA256SUMS`, sem dependências.
The build writes the address and brand into `aio.js` and creates `aio-<version>.tgz` and `SHA256SUMS`, with no dependencies.
Create your API key in the [API Center](https://www.meu.interweb.co.mz/api-center.php) of Meu Interweb. Documentation: https://docs.interweb.co.mz
---
Maintained by RLX Holdings.