/install ai-gateway
AI Gateway
Access 340+ AI models (OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, and more) through the Agnic AI Gateway. Costs are deducted from your USDC balance per token. Free models available for development.
Authentication
Run npx agnic@latest status --json to verify. If not authenticated:
- Headless (CI/server/agent): Set
AGNIC_TOKENenv var or pass--token \x3Ctoken> - Interactive (has browser): Run
npx agnic@latest auth login
See the authenticate-wallet skill for details.
Commands
List models
npx agnic@latest ai models [--provider \x3Cname>] [--search \x3Cterm>] [--json]
Chat with a model
npx agnic@latest ai chat --model \x3Cprovider/model-name> --prompt "\x3Ctext>" [--system "\x3Ctext>"] [--json]
Generate an image
npx agnic@latest ai image --prompt "\x3Ctext>" [--aspect-ratio 16:9] [--output file.png] [--json]
Models use provider/model-name format (e.g., openai/gpt-4o, meta-llama/llama-3.3-70b).
See reference/models-and-options.md for full model list, all options, and input validation rules.
Examples
# List OpenAI models
npx agnic@latest ai models --provider openai --json
# Chat with GPT-4o
npx agnic@latest ai chat --model openai/gpt-4o --prompt 'Explain quantum computing in one sentence'
# Use a free model
npx agnic@latest ai chat --model meta-llama/llama-3.3-70b --prompt 'What is 2+2?' --json
# Generate an image
npx agnic@latest ai image --prompt 'A sunset over mountains' --output sunset.png
# Generate widescreen image
npx agnic@latest ai image --prompt 'Cyberpunk cityscape' --aspect-ratio 16:9 --output city.png
Prerequisites
- Must be authenticated (
npx agnic@latest statusto check) - Wallet must have USDC balance (free models available for testing)
Error Handling
Common errors:
- "Not authenticated" -- Run
npx agnic@latest auth loginor setAGNIC_TOKEN - "Insufficient balance" -- Fund wallet at app.agnic.ai
- "Model not found" -- Check available models with
npx agnic@latest ai models - "No image returned" -- Try a different model or rephrase the prompt
- "Rate limit exceeded" -- Wait a moment and retry
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ai-gateway - 安装完成后,直接呼叫该 Skill 的名称或使用
/ai-gateway触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Agnic AI Gateway 是什么?
Access 340+ AI models via the Agnic AI Gateway -- chat, image generation, model listing. Use when the user wants to chat with AI, generate images, ask GPT, u... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 118 次。
如何安装 Agnic AI Gateway?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-gateway」即可一键安装,无需额外配置。
Agnic AI Gateway 是免费的吗?
是的,Agnic AI Gateway 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Agnic AI Gateway 支持哪些平台?
Agnic AI Gateway 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agnic AI Gateway?
由 Agnic.AI(@agnicpay-prog)开发并维护,当前版本 v2.0.2。