Documentation

106 AI tools, custom agent builder, scheduling, and 15 AI models — all in one API.

Overview

AiPayGen is the most comprehensive AI toolkit for developers and agents. Build custom AI agents, access 106 tools, 1500+ skills, and 4000+ APIs — all through a single API key or MCP connection.

Start building in 30 seconds
Get an API key and start making calls immediately.
Get API Key ($1)

Quick Start

Option 1: API Key (Recommended)

import httpx

BASE = "https://api.aipaygen.com"

# 1. Buy an API key
key = httpx.post(f"{BASE}/credits/buy",
    json={"amount_usd": 5.0}).json()["key"]  # apk_xxx

# 2. Use it on any endpoint
result = httpx.post(f"{BASE}/research",
    json={"topic": "quantum computing"},
    headers={"Authorization": f"Bearer {key}"}
).json()
print(result)

Option 2: MCP (Claude / Cursor)

# Install
pip install aipaygen-mcp

# Add to Claude Code
claude mcp add aipaygen -- aipaygen-mcp

# Or connect remotely (no install needed)
# URL: https://mcp.aipaygen.com/mcp

Option 3: Free Preview

# No payment or key needed
curl -X POST https://api.aipaygen.com/preview \
  -H "Content-Type: application/json" \
  -d '{"topic": "AI agents"}'

Payment Options

MethodHowBest For
API KeyPOST /credits/buy with StripeMost users — simple, prepaid credits
x402 USDCHTTP 402 + X-Payment headerCrypto-native agents, no accounts
MCPpip install aipaygen-mcpClaude/Cursor — 10 free/day, unlimited with key

Build Your Own Agent NEW

Create custom AI agents with their own personality, tools, model, memory, and scheduling — all through the API or the visual builder.

POST/agents/build
Create a custom agent with name, personality, tools, model, memory, and optional schedule.
# Create a crypto monitoring agent
agent = httpx.post(f"{BASE}/agents/build",
    json={
        "name": "Crypto Watcher",
        "system_prompt": "Monitor crypto prices and alert on big moves",
        "tools": ["get_crypto_prices", "analyze", "memory_store"],
        "model": "claude-haiku",
        "schedule": {"type": "loop", "config": {"minutes": 30}}
    },
    headers={"Authorization": f"Bearer {key}"}
).json()

agent_id = agent["agent_id"]

# Run the agent
result = httpx.post(f"{BASE}/agents/custom/{agent_id}/run",
    json={"task": "Check BTC and ETH prices, analyze trends"},
    headers={"Authorization": f"Bearer {key}"}
).json()
GET/agents/custom
List your custom agents.
GET/agents/custom/{id}
Get agent details and config.
PUT/agents/custom/{id}
Update agent config (name, tools, prompt, model, schedule, etc.).
POST/agents/custom/{id}/run
Execute a task with the agent.
DELETE/agents/custom/{id}
Archive an agent.

Agent Templates

Start from a pre-built template and customize. 10 templates available:

GET/builder/templates
List all available templates (JSON).

Scheduling & Automation

Agents can run automatically on three trigger types:

Loop (Interval)

httpx.post(f"{BASE}/agents/custom/{agent_id}/schedule",
    json={"type": "loop", "config": {"minutes": 30}},
    headers={"Authorization": f"Bearer {key}"})

Cron (Schedule)

httpx.post(f"{BASE}/agents/custom/{agent_id}/schedule",
    json={"type": "cron", "config": {"hour": 9, "minute": 0, "day_of_week": "mon-fri"}},
    headers={"Authorization": f"Bearer {key}"})

Event (Trigger)

httpx.post(f"{BASE}/agents/custom/{agent_id}/schedule",
    json={"type": "event", "config": {"trigger": "message"}},
    headers={"Authorization": f"Bearer {key}"})
GET/agents/custom/{id}/runs
View execution history for an agent.

AI Tools

40+ AI-powered endpoints. All accept an optional model parameter.

POST/research
Deep research on any topic with web sources.
POST/summarize
Summarize text into bullets, paragraph, or TL;DR.
POST/analyze
Analyze text with a specific question.
POST/write
Generate written content (blog, email, copy).
POST/code
Generate, explain, or debug code.
POST/translate
Translate text to any language.
POST/sentiment
Detect sentiment (positive/negative/neutral).
POST/classify
Classify text into custom categories.
POST/vision
Analyze images with AI.
POST/rag
Retrieval-augmented generation over documents.

Plus: /rewrite, /extract, /qa, /compare, /outline, /explain, /proofread, /keywords, /headline, /social, /pitch, /diagram, /json_schema, /workflow, /pipeline, /batch, /chain, /test_cases, /sql, /regex, /mock, /debate, /decide, /plan, /score, /tag, /fact, /questions, /email, /enrich

Data Lookups

GET/data/weather?city=London
Current weather for any city.
GET/data/crypto?symbols=BTC,ETH
Live crypto prices.
GET/data/exchange?from=USD&to=EUR
Currency exchange rates.
GET/data/holidays?country=US
Public holidays by country.
GET/data/joke
Random joke. FREE
GET/data/quote
Random inspirational quote. FREE

Web Scraping

POST/scrape/website
Scrape any website URL.
POST/scrape/google-maps
Scrape Google Maps business listings.
POST/scrape/tweets
Scrape tweets by keyword or user.
POST/scrape/youtube
Scrape YouTube video data and transcripts.
POST/scrape/instagram
Scrape Instagram profiles and posts.
POST/scrape/tiktok
Scrape TikTok videos and profiles.

Agent System

POST/agent
Autonomous ReAct agent — give it a task, it reasons through it using tools.
POST/agent/stream
Streaming agent with SSE events.
POST/agents/register
Register an agent in the network.
GET/agents
List all registered agents.
GET/agents/search?q=keyword
Search agents by capability.

Agent Memory

Persistent key-value memory for agents across conversations.

POST/memory/set
Store a value in agent memory.
POST/memory/get
Retrieve a value from agent memory.
POST/memory/search
Search agent memory by keyword.
POST/memory/list
List all memory keys for an agent.

Skills Library

1500+ searchable, executable skills. Create your own or use community skills.

GET/skills/search?q=keyword
Search skills by keyword (TF-IDF ranked).
POST/skills/execute
Execute a skill by name with input.
POST/skills/create
Create a new reusable skill.

API Catalog

4000+ indexed APIs — search, discover, and invoke third-party APIs through AiPayGen.

GET/catalog
Browse the full API catalog.
GET/catalog/{id}
Get details for a specific API.
POST/catalog/{id}/invoke
Invoke a cataloged API through AiPayGen.

MCP Integration

All 106 tools are available as MCP tools. Three ways to connect:

1. PyPI Package (Recommended)

# Install
pip install aipaygen-mcp

# Add to Claude Code
claude mcp add aipaygen -- aipaygen-mcp

# Add to Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "aipaygen": {
      "command": "aipaygen-mcp",
      "env": { "AIPAYGEN_API_KEY": "apk_xxx" }
    }
  }
}

2. Remote SSE (No Install)

# Connect directly — works in any MCP client
URL: https://mcp.aipaygen.com/mcp

3. MCP Registry

# Listed on registry.modelcontextprotocol.io
# ID: io.github.Damien829/aipaygen

Available Models

ModelProviderBest For
autoAiPayGenAutomatic — picks best model for the task
claude-sonnetAnthropicComplex reasoning, analysis
claude-haikuAnthropicFast, cheap, good enough for most tasks
gpt-4oOpenAIGeneral purpose, strong coding
gpt-4o-miniOpenAIFast and cheap
deepseek-chatDeepSeekCoding, technical tasks
deepseek-reasonerDeepSeekComplex reasoning chains
gemini-2.0-flashGoogleFast, multimodal
grok-3-minixAIReal-time knowledge
mistral-smallMistralEfficient, multilingual
llama-4-scoutMetaOpen-weight, fast
# Use any model on any endpoint
httpx.post(f"{BASE}/research",
    json={"topic": "AI", "model": "deepseek-chat"},
    headers={"Authorization": f"Bearer {key}"})

Discovery Endpoints

Free Endpoints

No payment or API key needed:

POST/preview
Free Claude demo — try before you buy. FREE
GET/free/time
Current UTC time. FREE
GET/free/uuid
Generate a UUID. FREE
GET/free/ip
Your IP address info. FREE
GET/free/hash
Hash text (SHA256, MD5, etc.). FREE
GET/free/base64
Base64 encode/decode. FREE
GET/free/random
Random numbers/strings. FREE
GET/health
Service health check. FREE
GET/discover
Full service catalog. FREE

Payment Details