通过 Agnic AI 网关访问 340+ AI 模型,可进行聊天、图像生成、模型列表查询。用户想与 AI 对话、生成图像或提问 GPT 时使用。
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.
Run npx agnic@latest status --json to verify. If not authenticated:
AGNIC_TOKEN env var or pass --token <token>npx agnic@latest auth loginSee the authenticate-wallet skill for details.
bash
npx agnic@latest ai models [--provider <name>] [--search <term>] [--json]
bash
npx agnic@latest ai chat --model <provider/model-name> --prompt "<text>" [--system "<text>"] [--json]
bash
npx agnic@latest ai image --prompt "<text>" [--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.
bash
# 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
npx agnic@latest status to check)Common errors:
npx agnic@latest auth login or set AGNIC_TOKENnpx agnic@latest ai models