# AiPayGen > 106 AI tools in one API. Multi-model (Claude, GPT-4o, DeepSeek, Gemini, Grok, Mistral, Llama). Three payment paths: API key (from $1), x402 USDC, or MCP (10 free/day). ## What This Service Does AiPayGen is a pay-per-use AI platform for autonomous agents. Research, write, code, analyze, scrape, and more. Built for agent pipelines with persistent memory and skill discovery. ## Capabilities - **AI Processing** — research, write, code, analyze, translate, summarize, classify, sentiment, RAG, vision, diagrams - **Web Scraping** — Google Maps, Twitter/X, Instagram, LinkedIn, YouTube, TikTok, any website - **Agent Infrastructure** — persistent memory, messaging, task boards, webhook relay, async jobs, file storage - **Data & Utilities** — weather, crypto, stocks, news, Wikipedia, arXiv, GitHub trending - **Skills Library** — 646+ searchable skills via TF-IDF. Search, browse, and execute dynamically. - **Multi-Model** — Claude, GPT-4o, DeepSeek, Gemini. All AI endpoints accept `model` parameter. ## Payment Options (3 Paths) ### 1. API Key (Recommended — Easiest) Buy a prepaid API key via Stripe or x402. Use it everywhere with Bearer auth. - `POST /credits/buy` with `{"amount_usd": 5.0}` → returns `apk_xxx` key - Use: `Authorization: Bearer apk_xxx` header on any endpoint - 20% bulk discount when balance >= $2.00 - Token-based metering available: `X-Pricing: metered` header ### 2. x402 USDC (Crypto-Native) - **Standard**: [x402](https://x402.org) — HTTP 402 Payment Required - **Network**: Base Mainnet (eip155:8453) - **Token**: USDC (6 decimals) - **Flow**: POST endpoint → 402 with payment instructions → retry with `X-Payment` header ### 3. MCP (Free Tier) - 10 free calls/day, no payment needed - Unlimited with `AIPAYGEN_API_KEY` env var - Install: `pip install aipaygen-mcp && claude mcp add aipaygen -- python -m aipaygen_mcp` - SSE endpoint: https://mcp.aipaygen.com/mcp ## Discovery Endpoints - `GET /discover` — machine-readable service catalog (JSON) - `GET /.well-known/agent.json` — A2A Agent Card - `GET /openapi.json` — OpenAPI 3.1 spec - `GET /llms.txt` — this file - `GET /health` — service health check - `POST /preview` — free Claude demo (no payment needed) ## Quick Start ```python import httpx BASE = "https://api.aipaygen.com" # 1. Get an API key (easiest path) key_resp = httpx.post(f"{BASE}/credits/buy", json={"amount_usd": 5.0}).json() API_KEY = key_resp["key"] # apk_xxx # 2. Use it on any endpoint result = httpx.post(f"{BASE}/research", json={"topic": "quantum computing"}, headers={"Authorization": f"Bearer {API_KEY}"} ).json() # Free preview (no payment needed) print(httpx.post(f"{BASE}/preview", json={"topic": "AI agents"}).json()) ``` ## Notes for AI Agents - All paid responses include `_meta` with endpoint, model, network, timestamp. - Fetch `/discover` for the service catalog before calling endpoints. - USDC precision: 6 decimals. Network: Base Mainnet (eip155:8453). - Agent memory persists indefinitely — use a stable `agent_id`. - API key is the fastest path — one POST and you're running.