# AiPayGen > 244 AI tools in one API (v1.8.3). Multi-model (Claude, GPT-4o, DeepSeek, Gemini, Grok, Mistral, Llama). Three payment paths: API key (from $1), x402 USDC, or MCP (10 free/day). New: $0.25 trial credits via buy_credits / generate_api_key MCP tools. ## 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** — 2400+ searchable skills via TF-IDF. Search, browse, and execute dynamically. - **Multi-Model** — Claude, GPT-4o, DeepSeek, Gemini. All AI endpoints accept `model` parameter. ## Authentication (3 Paths) ### 1. Free Tier (No Auth) - 10 calls/day per IP, no key needed - Just POST JSON to any endpoint ### 2. API Key (Recommended) 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 ### 3. 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 ## Top 15 Tools — Input/Output & Pricing | Tool | Endpoint | Price | Input (JSON POST) | Output | |------|----------|-------|--------------------|--------| | Research | POST /research | $0.01 | `{"topic": "..."}` | `{"result": "...", "_meta": {...}}` | | Summarize | POST /summarize | $0.01 | `{"text": "..."}` | `{"summary": "..."}` | | Translate | POST /translate | $0.02 | `{"text": "...", "target": "es"}` | `{"translation": "..."}` | | Code | POST /code | $0.05 | `{"task": "...", "language": "python"}` | `{"code": "...", "explanation": "..."}` | | Write | POST /write | $0.05 | `{"prompt": "...", "tone": "professional"}` | `{"text": "..."}` | | Analyze | POST /analyze | $0.02 | `{"text": "...", "aspects": [...]}` | `{"analysis": "..."}` | | Scrape Website | POST /scrape/website | $0.02 | `{"url": "https://..."}` | `{"content": "...", "title": "..."}` | | Sentiment | POST /sentiment | $0.01 | `{"text": "..."}` | `{"sentiment": "positive", "score": 0.92}` | | Extract | POST /extract | $0.02 | `{"text": "...", "fields": [...]}` | `{"extracted": {...}}` | | Compare | POST /compare | $0.02 | `{"items": ["A", "B"]}` | `{"comparison": "..."}` | | Classify | POST /classify | $0.01 | `{"text": "...", "categories": [...]}` | `{"category": "...", "confidence": 0.95}` | | Web Search | POST /web-search | $0.02 | `{"query": "..."}` | `{"results": [...]}` | | Fact Check | POST /fact | $0.02 | `{"claim": "..."}` | `{"verdict": "...", "evidence": "..."}` | | Batch | POST /batch | $0.10 | `{"operations": [{...}, ...]}` | `{"results": [...]}` | | Vision | POST /vision | $0.05 | `{"image_url": "...", "question": "..."}` | `{"description": "..."}` | ## Example curl Calls ### Research ```bash curl -X POST https://api.aipaygen.com/research \ -H "Content-Type: application/json" \ -H "Authorization: Bearer apk_YOUR_KEY" \ -d '{"topic": "quantum computing breakthroughs 2026"}' ``` ### Summarize ```bash curl -X POST https://api.aipaygen.com/summarize \ -H "Content-Type: application/json" \ -H "Authorization: Bearer apk_YOUR_KEY" \ -d '{"text": "Long article text here...", "length": "short"}' ``` ### Translate ```bash curl -X POST https://api.aipaygen.com/translate \ -H "Content-Type: application/json" \ -H "Authorization: Bearer apk_YOUR_KEY" \ -d '{"text": "Hello world", "target": "ja"}' ``` ### Code ```bash curl -X POST https://api.aipaygen.com/code \ -H "Content-Type: application/json" \ -H "Authorization: Bearer apk_YOUR_KEY" \ -d '{"task": "fibonacci sequence generator", "language": "python"}' ``` ### Scrape Website ```bash curl -X POST https://api.aipaygen.com/scrape/website \ -H "Content-Type: application/json" \ -H "Authorization: Bearer apk_YOUR_KEY" \ -d '{"url": "https://example.com"}' ``` ## MCP (Model Context Protocol) - 10 free calls/day, no payment needed - Unlimited with `AIPAYGEN_API_KEY` env var - **New**: Use the `buy_credits` or `generate_api_key` MCP tools to get $0.25 trial credits instantly - Install: `pip install aipaygen-mcp && claude mcp add aipaygen -- python -m aipaygen_mcp` - Remote SSE: https://mcp.aipaygen.com/mcp ## Discovery Endpoints - `GET /discover` — machine-readable service catalog (JSON) - `GET /.well-known/agent.json` — A2A Agent Card - `GET /.well-known/ai-plugin.json` — ChatGPT/OpenAI plugin manifest - `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) ```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()) ``` ## All 229 Tools For the full list of all 244 tools with pricing and input/output schemas, query: - `GET /discover` — machine-readable JSON catalog of every endpoint - `GET /openapi.json` — OpenAPI 3.1 spec ## Links - Documentation: https://aipaygen.com/docs - SDK & Code Examples: https://aipaygen.com/sdk - Interactive Playground: https://aipaygen.com/try - API Catalog: https://aipaygen.com/discover - Pricing: https://aipaygen.com/pricing - OpenAPI Spec: https://api.aipaygen.com/openapi.json - PyPI: https://pypi.org/project/aipaygen-mcp/ - MCP Registry: https://registry.modelcontextprotocol.io (ID: io.github.Damien829/aipaygen) - Buy Credits: https://aipaygen.com/buy-credits - Security: https://aipaygen.com/security - MCP Registry: https://registry.modelcontextprotocol.io/servers/io.github.Damien829/aipaygen ## 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. - MCP users: call `buy_credits` or `generate_api_key` to get $0.25 trial credits and an API key. - 402 responses include `Link` headers pointing to /openapi.json and /.well-known/ai-plugin.json.