smart-aipi
v1.4.2
Published
CLI for Smart AIPI - OpenAI-compatible API gateway
Downloads
61
Maintainers
Readme
Smart AIPI CLI
CLI for Smart AIPI — OpenAI-compatible API at 75% off.
Install
Install both packages (recommended)
npm install -g smart-aipi @smart-aipi/mcpWhat each package provides:
smart-aipi(CLI): programmatic control for account, keys, tokens, and usage from terminal.@smart-aipi/mcp: easy setup for AI agents through MCP with docs + management tools.
CLI only
npm install -g smart-aipiOr with Homebrew:
brew tap smart-aipi/tap
brew install smart-aipiQuick Start
# Create an account
smart-aipi signup
# Create an API key
smart-aipi keys create
# Set environment variables
export OPENAI_BASE_URL=https://api.smartaipi.com/v1
export OPENAI_API_KEY=sk-your-key
# Done — your AI tools now use Smart AIPICommands
Account
| Command | Description |
|---------|-------------|
| smart-aipi signup | Create a new account |
| smart-aipi login | Log in |
| smart-aipi logout | Log out |
| smart-aipi status | Show login status |
| smart-aipi me | Show account info |
| smart-aipi usage | Show credits and usage |
API Keys
| Command | Description |
|---------|-------------|
| smart-aipi keys list | List your API keys |
| smart-aipi keys create | Create a new API key |
| smart-aipi keys revoke <id> | Revoke an API key |
Tokens (for MCP)
| Command | Description |
|---------|-------------|
| smart-aipi tokens list | List account tokens |
| smart-aipi tokens create | Create a token for MCP server |
Documentation
| Command | Description |
|---------|-------------|
| smart-aipi docs | List all setup guides |
| smart-aipi docs <topic> | Show setup guide for a specific tool |
| smart-aipi models | List available models |
| smart-aipi models --live | Fetch live model list from API |
| smart-aipi config | Show base URL and env vars |
Available docs topics
- Getting Started: quickstart, models
- IDE & Agents: cursor, cline, windsurf, continue, aider, opencode, codex-cli
- SDKs: python, nodejs, langchain
- MCP Server: mcp
Connecting to AI Tools
Cursor
Settings > Models > Override OpenAI Base URL
Base URL: https://api.smartaipi.com/v1
API Key: sk-your-keyOpenCode
Edit ~/.config/opencode/config.json:
{
"provider": {
"openai": {
"options": {
"baseURL": "https://api.smartaipi.com/v1",
"apiKey": "sk-your-key"
},
"models": {
"gpt-5.3-codex": {}
}
}
},
"model": "openai/gpt-5.3-codex"
}Codex CLI
export OPENAI_BASE_URL=https://api.smartaipi.com/v1
export OPENAI_API_KEY=sk-your-key
codex "explain this code"Any OpenAI-compatible tool
Just set OPENAI_BASE_URL and OPENAI_API_KEY. Run smart-aipi docs <tool> for specific guides.
Available Models
Codex (Code-optimized)
gpt-5.3-codex— latest, recommendedgpt-5.2-codex,gpt-5.1-codex,gpt-5-codexgpt-5.2-codex-mini,gpt-5.1-codex-mini,gpt-5-codex-minigpt-5.1-codex-max— maximum context window
GPT-5
gpt-5.2,gpt-5.1,gpt-5
Image Generation
gpt-image-latest— always points to latestgpt-image-1.5,gpt-image-1-mini
Free Tier
gpt-4.1,gpt-4.1-mini,gpt-4.1-nanogpt-5-mini,gpt-5-nanogpt-4o,gpt-4o-mini
MCP Server
For AI agents that support MCP, install the companion server:
npm install -g @smart-aipi/mcp
smart-aipi tokens create -n "MCP Token"See smart-aipi docs mcp for full setup instructions.
License
MIT
Development
The published CLI runtime files are in:
bin/cli.jslib/*.js
TypeScript source files live in:
src/bin/cli.tssrc/lib/*.ts
Validation commands:
npm testInstall TypeScript first if needed:
npm install --save-dev typescript @types/nodeThen rebuild JS outputs from TS:
npm run build