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
- Sign up at platform.eruditepay.com/signup and get an API key.
- Browse available endpoints at /browse or use the search API.
- Fund your account with USDC on Base, or pay per call via x402.
- 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_.
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
- Request: Your client sends a normal API request without payment.
- 402 Response: The server responds with HTTP
402 Payment Requiredand a JSON body containing payment details: the price, the payee address, the chain, and a payment URI. - Payment: Your client signs a USDC transfer for the exact amount and submits it on-chain (Base Mainnet).
- Retry: Your client re-sends the original request, now including the transaction hash in the
X-Payment-Txheader. - 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..."
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
How to list an endpoint
- Sign up as a provider at /provider/signup. Provide your business name, email, and Base wallet address for payouts.
- Submit your endpoint via the provider dashboard. You specify the URL, HTTP method, parameters, pricing (per call in USDC), and a description.
- EruditePay reviews and activates your listing. Once approved, it appears on the marketplace and is accessible via the proxy and MCP.
- 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
- Create an account at /signup.
- Get your API key from the dashboard. Use this key in the
Authorizationheader for every request. - 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.
- 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
| Tier | Rate Limit | Price |
|---|---|---|
| Free | 50 calls/day | $0 |
| Pro | 10,000 calls/day | $29/mo |
| Enterprise | 100,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
| Endpoint | Method | Description |
|---|---|---|
| POST /auth/register | POST | Create a new account |
| POST /auth/login | POST | Log in, receive JWT |
API Keys
| Endpoint | Method | Description |
|---|---|---|
| GET /keys | GET | List your API keys |
| POST /keys | POST | Generate a new key |
| DELETE /keys/:id | DEL | Revoke a key |
Marketplace
| Endpoint | Method | Description |
|---|---|---|
| GET /endpoints | GET | List all marketplace endpoints |
| GET /endpoints/:slug | GET | Get endpoint details |
| GET /proxy/:provider/:endpoint | GET | Call a marketplace endpoint (metered) |
Account
| Endpoint | Method | Description |
|---|---|---|
| GET /usage | GET | View usage history |
| GET /billing | GET | View billing and balance |
| GET /health | GET | Platform health check |