Getting Started

EruditePay is an API marketplace where providers list paid endpoints and consumers pay per call using USDC stablecoins. The platform handles authentication, metering, billing, and settlement so providers can focus on building and consumers can focus on integrating.

Every API call is gated by the x402 protocol or by a prepaid account balance. Providers keep 78.5% of revenue; EruditePay takes 21.5% to cover infrastructure, settlement, and compliance.

How it works

  1. Sign up at platform.eruditepay.com/signup and get an API key.
  2. Browse available endpoints at /browse or use the search API.
  3. Fund your account with USDC on Base, or pay per call via x402.
  4. Make API calls with your key. Each call is metered and billed at the listed price.

Authentication

All API requests require a valid API key passed in the Authorization header using the Bearer scheme.

Authorization: Bearer ep_key_xxxxx

API keys are issued when you create an account. You can generate additional keys or rotate existing ones from your dashboard.

Key format

All keys are prefixed with ep_key_ followed by 40 hex characters. Provider keys use the prefix ep_prov_. Admin keys use ep_admin_.

Keep your key secret. Do not commit API keys to source control or expose them in client-side code. Use environment variables or a secrets manager.

Error responses

If authentication fails, the API returns 401 Unauthorized with a JSON body:

{
  "error": "unauthorized",
  "message": "Invalid or missing API key"
}

Making Your First Call

Once you have an API key, you can call any endpoint listed on the marketplace. Below is an example calling a hypothetical weather endpoint.

curl -X GET "https://platform.eruditepay.com/api/v1/proxy/weather/current?city=london" \
  -H "Authorization: Bearer ep_key_your_key_here"
import requests

resp = requests.get(
    "https://platform.eruditepay.com/api/v1/proxy/weather/current",
    params={"city": "london"},
    headers={"Authorization": "Bearer ep_key_your_key_here"}
)
print(resp.json())
const resp = await fetch(
  "https://platform.eruditepay.com/api/v1/proxy/weather/current?city=london",
  { headers: { Authorization: "Bearer ep_key_your_key_here" } }
);
const data = await resp.json();
console.log(data);
req, _ := http.NewRequest("GET",
    "https://platform.eruditepay.com/api/v1/proxy/weather/current?city=london", nil)
req.Header.Set("Authorization", "Bearer ep_key_your_key_here")

resp, err := http.DefaultClient.Do(req)
// handle err, read resp.Body

Response

{
  "city": "london",
  "temperature_c": 14,
  "condition": "partly cloudy",
  "provider": "weatherstack",
  "cost_usdc": "0.001"
}

Every response includes a cost_usdc field showing what was charged for that call.

x402 Payment Flow

EruditePay supports the x402 protocol for trustless, pay-per-call payments. Instead of prepaying a balance, your agent or client pays for each call at the moment it is made using USDC on Base.

How x402 works

  1. Request: Your client sends a normal API request without payment.
  2. 402 Response: The server responds with HTTP 402 Payment Required and a JSON body containing payment details: the price, the payee address, the chain, and a payment URI.
  3. Payment: Your client signs a USDC transfer for the exact amount and submits it on-chain (Base Mainnet).
  4. Retry: Your client re-sends the original request, now including the transaction hash in the X-Payment-Tx header.
  5. Verification: The server verifies the on-chain payment, executes the API call, and returns the result.

402 response example

HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "x402": {
    "version": 1,
    "price": "0.005",
    "currency": "USDC",
    "chain": "eip155:8453",
    "payee": "0x6961b88476a9b89C4ed97A4aF4D190754d5e70A1",
    "description": "Weather API call"
  }
}

Retry with payment proof

curl -X GET "https://platform.eruditepay.com/api/v1/proxy/weather/current?city=london" \
  -H "X-Payment-Tx: 0xabc123..."
AI agents and x402. The x402 protocol is designed for autonomous AI agents that hold their own wallets. Libraries like x402-client handle the full 402-pay-retry cycle automatically.

MCP Integration

EruditePay endpoints are accessible through the Model Context Protocol (MCP), allowing AI assistants (Claude, GPT, etc.) to discover and call APIs as tools.

MCP server

The EruditePay MCP server is available at:

https://mcp.eruditepay.com

Point your MCP-compatible client at this URL. The server exposes each marketplace endpoint as a callable tool, complete with parameter schemas and pricing metadata.

Configuration example (Claude Desktop)

{
  "mcpServers": {
    "eruditepay": {
      "url": "https://mcp.eruditepay.com",
      "headers": {
        "Authorization": "Bearer ep_key_your_key_here"
      }
    }
  }
}

Once connected, the AI assistant can browse available endpoints, check pricing, and make paid calls on behalf of the user.

Provider Guide

Providers are developers or companies who list API endpoints on the EruditePay marketplace. When consumers call your endpoint, you earn revenue on every request.

Revenue split

78.5%
Provider (you keep)
21.5%
EruditePay

How to list an endpoint

  1. Sign up as a provider at /provider/signup. Provide your business name, email, and Base wallet address for payouts.
  2. Submit your endpoint via the provider dashboard. You specify the URL, HTTP method, parameters, pricing (per call in USDC), and a description.
  3. EruditePay reviews and activates your listing. Once approved, it appears on the marketplace and is accessible via the proxy and MCP.
  4. Get paid. Revenue accumulates in your provider balance and is settled to your wallet on a rolling basis.

Endpoint requirements

  • Must return valid JSON responses.
  • Must respond within 30 seconds (timeout limit).
  • Must be reachable from EruditePay servers (no localhost or private IPs).
  • Must not serve illegal, abusive, or malicious content.

Consumer Guide

Consumers are developers, businesses, or AI agents that call API endpoints on the marketplace.

Getting started as a consumer

  1. Create an account at /signup.
  2. Get your API key from the dashboard. Use this key in the Authorization header for every request.
  3. Fund your account. Deposit USDC on Base to your EruditePay wallet address (shown in your dashboard). Alternatively, use x402 to pay per call without a pre-funded balance.
  4. Browse endpoints at /browse and start making calls.

Billing

Each API call is priced individually by the provider (typically $0.001 to $0.05 per call). Your balance is debited after each successful call. You can view your usage and spending history in the dashboard.

Rate limits

TierRate LimitPrice
Free50 calls/day$0
Pro10,000 calls/day$29/mo
Enterprise100,000 calls/day$99/mo

Per-call costs are billed on top of the tier subscription. The free tier includes 50 calls/day with no subscription.

API Reference

Base URL: https://platform.eruditepay.com/api/v1

Authentication

EndpointMethodDescription
POST /auth/registerPOSTCreate a new account
POST /auth/loginPOSTLog in, receive JWT

API Keys

EndpointMethodDescription
GET /keysGETList your API keys
POST /keysPOSTGenerate a new key
DELETE /keys/:idDELRevoke a key

Marketplace

EndpointMethodDescription
GET /endpointsGETList all marketplace endpoints
GET /endpoints/:slugGETGet endpoint details
GET /proxy/:provider/:endpointGETCall a marketplace endpoint (metered)

Account

EndpointMethodDescription
GET /usageGETView usage history
GET /billingGETView billing and balance
GET /healthGETPlatform health check
Full OpenAPI spec coming soon. We are working on a machine-readable OpenAPI 3.1 specification. In the meantime, use this reference and the endpoint detail pages on /browse.