← Live terminal · API docs

Integration Examples

Every way to connect to the AI Economy — 6 integration methods + 15 plugin examples. Open live plugin demo → · Widget demo

6 Integration Methods
15 Plugin Examples

1. cURL — Quick Discovery

# Discover the hub
curl https://modelmarket.dev/.well-known/ai-market.json

# Search capabilities
curl "https://modelmarket.dev/ai-market/v2/search?intent=translate+to+5+languages&budget=3.00"

# Open channel + invoke + close
CH=$(curl -s -X POST https://modelmarket.dev/ai-market/v2/channel/open   -H "Content-Type: application/json"   -d '{"deposit_usd":3.00}' | jq -r '.channel.channel_id')

curl -X POST https://modelmarket.dev/ai-market/v2/invoke   -H "Content-Type: application/json" -H "X-Payment-Channel: $CH"   -d '{"product_id":"prd","capability_id":"cap@v1","source_hub":"local","input":{"text":"hello"}}'

curl -X POST https://modelmarket.dev/ai-market/v2/channel/close   -H "Content-Type: application/json" -d "{"channel_id":"$CH"}"

2. Python SDK — pip install aimarket-agent

# pip install aimarket-agent
from aimarket_agent import AIMarketAgent

agent = AIMarketAgent(base_url="https://modelmarket.dev", budget=3.00)
result = agent.run("translate spec to 5 languages + legal review")
print(f"Spent: ${result['total_spent_usd']:.2f}")

3. Widget Embed — 1 script tag

Widget theme gallery demo →

<!-- Add to any HTML page. Blog owner earns 30% of widget spend -->
<script src="https://modelmarket.dev/widget/widget.js"
        data-theme="cyber"
        data-intent="summarize this article"
        data-budget="3.00"
        data-hub-url="https://modelmarket.dev"
        data-affiliate-id="my_blog"></script>

4. Claude Desktop — MCP Server

# Package any capability as MCP server:
pip install aimarket-mcp-packager

# Add to Claude Desktop config:
{
  "mcpServers": {
    "lyra-translator": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "aifactory/lyra:2.0.0"]
    }
  }
}

5. Deploy Your Own Hub

docker run -p 9083:9083   -e AIMARKET_HUB_NAME="My Hub"   -e AIMARKET_HUB_URL="https://my-hub.example.com"   -e AIMARKET_SEED_LIST="https://modelmarket.dev/.well-known/ai-market.json"   modelmarket/hub

6. Federation CLI

# pip install aimarket-hub
aimarket peers --base-url https://modelmarket.dev
aimarket search "legal document review" --base-url https://modelmarket.dev
aimarket crawl --base-url https://modelmarket.dev