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, use Claude, list models, delegate to another LLM, or get a second opinion. Covers "ask GPT", "use Claude", "generate an image", "list AI models", "call a model".
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/agnicpay-prog/ai-gatewayAI 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 <token> - 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 <name>] [--search <term>] [--json]
Chat with a model
npx agnic@latest ai chat --model <provider/model-name> --prompt "<text>" [--system "<text>"] [--json]
Generate an image
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.
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
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-agnicpay-prog-ai-gateway": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
trade-tokens
Swap or trade tokens on Base network. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and WETH. Covers phrases like "buy ETH", "sell ETH for USDC", "convert USDC to ETH", "get some ETH", "swap tokens", "trade USDC for WETH".
check-balance
Check USDC balance across networks (Base, Solana). Use when the user wants to check balance, see how much USDC is available, view funds, or verify wallet balance. Covers "check my balance", "how much do I have", "show funds", "wallet balance".
authenticate-wallet
Authenticate Agnic wallet via browser OAuth or headless API token. Use when the user wants to sign in, log in, authenticate, connect wallet, set up CLI, or resolve "Not authenticated" errors. Supports AGNIC_TOKEN env var for CI/server/agent environments.
authenticate-wallet
Authenticate Agnic wallet via browser OAuth or headless API token. Use when the user wants to sign in, log in, authenticate, connect wallet, set up CLI, or resolve "Not authenticated" errors. Supports AGNIC_TOKEN env var for CI/server/agent environments.
agnic
Complete AI agent wallet with payments, trading, email, and on-chain identity. Use when the user wants to manage their agent's wallet, make payments, trade tokens, send/receive email, or check their agent identity.