# PredMaker x402 SDK Quickstart

Gateway: `https://predmaker.com`  
Payments: Base L2 USDC via `X-PAYMENT` (EIP-3009) or legacy `X-402-Payment-Proof`

## Install (drop-in)

Copy `connectors/` into your agent repo (no private registry required).

## LangChain (3 lines)

```python
from connectors.langchain_x402 import PredMakerX402Tool
tool = PredMakerX402Tool(base_url="https://predmaker.com")
print(tool.challenge("/api/v1/monetized"))  # or tool._run("challenge") with langchain-core
```

## CrewAI (3 lines)

```python
from connectors.crewai_x402 import predmaker_x402_challenge, predmaker_x402_settle
print(predmaker_x402_challenge())
# print(predmaker_x402_settle("<base64_X-PAYMENT>"))
```

## ElizaOS (3 lines)

```js
import { x402Plugin } from "./connectors/elizaos_x402/index.js";
// register in agent: plugins: [x402Plugin]
await x402Plugin.actions[0].handler(null, { content: { path: "/api/v1/monetized" } });
```

## Referral rebate (1500 BPS / 15%)

Append `?ref=<your_wallet>` on monetized paths so inbound agent traffic pays you automatically:

```bash
curl -sS -H "X-PAYMENT: <base64_auth>" \
  "https://predmaker.com/api/v1/monetized/edgar-m-and-a?ref=0xYourWallet"
```

Or include `"referral_wallet":"0xYourWallet"` inside the X-PAYMENT JSON body.

## MCP (Cursor / Claude Desktop)

```json
{
  "mcpServers": {
    "predmaker": {
      "url": "https://predmaker.com/mcp",
      "transport": "streamable-http"
    }
  }
}
```

Tools: `get_arbitrage_spreads`, `get_high_velocity_signals`, `get_sec_edgar_ma_alpha`  
Public teasers: https://predmaker.com/alpha/ · Telegram: https://t.me/PredMakerAlpha
Legacy SSE (Smithery): https://predmaker.com/mcp/sse

## Unlock a paid signal (curl)

```bash
# 1) Fetch challenge
curl -sS "https://predmaker.com/api/v1/x402/challenge?path=/api/v1/monetized/edgar-m-and-a"

# 2) After EIP-3009 auth (or on-chain USDC transfer):
curl -sS -H "X-PAYMENT: <base64_auth>" \
  "https://predmaker.com/api/v1/monetized/edgar-m-and-a?ref=0xYourWallet"
```

## Prices

| Path | USDC |
|---|---|
| `/api/v1/monetized` | 0.01 |
| `/api/v1/monetized/edgar-m-and-a` | 0.025 |

Interactive docs: https://predmaker.com/docs  
OpenAPI: https://predmaker.com/openapi.json  
Agent card: https://predmaker.com/.well-known/agent.json
