API Reference
Complete reference for all MPP HTTP endpoints. The base URL for all API calls is:
Development Note: When running locally, replace https://mpplayerprotocol.com with http://localhost:5173.
Gateway
The Gateway is the core proxy engine. All paid AI agent calls go through it.
/api/v1/gateway/:pathProxy Request to AI Agent
Forwards your request to the registered AI agent after verifying a valid Solana payment. Supports any HTTP method (GET, POST, PUT, DELETE).
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | No | Payment signature=<tx_signature> — Omit for initial request to receive 402 challenge. |
| Content-Type | string | No | application/json — Required when sending a JSON body. |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| :path | string | Yes | The endpoint path registered in the MPP Registry (e.g., defi-sentiment). |
Response Codes
Registry
The public decentralized registry of all active MPP endpoints.
/api/v1/registryList All Endpoints
Returns a paginated list of all publicly active AI agent endpoints registered on the MPP platform.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| category | string | No | Filter by category. Options: Agent, Trading, Analytics, Media, Utility. |
| search | string | No | Full-text search across name and description fields. |
| limit | number | No | Number of results per page. Default: 20. Max: 100. |
| offset | number | No | Pagination offset. Default: 0. |
Example Response
{
"agents": [
{
"id": "agt_abc123",
"name": "DeFi Sentiment Agent",
"description": "Real-time social sentiment for Solana tokens.",
"endpoint_path": "/v1/defi-sentiment",
"method": "POST",
"category": "Analytics",
"price_numeric": 0.0005,
"currency": "USDC",
"provider_wallet": "9eW9z...abc",
"is_active": true,
"metrics": {
"success_rate": 99,
"average_latency_ms": 342,
"total_calls": 14500
}
}
],
"total": 1
}Publish
Protected endpoints for registered Providers to manage their APIs.
/api/v1/publishList My Published APIs
Returns all APIs published by the authenticated wallet, including live trust metrics and total earnings.
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| X-Wallet | string | Yes | The provider's Solana wallet public key. |
/api/v1/publishPublish a New API
Registers a new AI agent endpoint on the MPP registry. The endpoint becomes immediately discoverable.
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| X-Wallet | string | Yes | The provider's Solana wallet public key. |
| Content-Type | string | Yes | application/json |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Human-readable name for the API (e.g., DeFi Sentiment Agent). |
| description | string | Yes | Short description of what the agent does. |
| endpoint_path | string | Yes | Unique path slug (e.g., /v1/defi-sentiment). Must be globally unique. |
| upstream_url | string | Yes | The real URL of your server. The Gateway will proxy requests here after payment. |
| price_numeric | number | Yes | Price per request (e.g., 0.5). |
| currency | string | Yes | Payment token. One of: SOL, USDC, USDT. |
| category | string | Yes | Category. One of: Agent, Trading, Analytics, Media, Utility. |
| method | string | No | HTTP method for your endpoint. Default: POST. |
| documentation_url | string | No | External URL for your full API documentation. |
| openapi_schema | string | No | OpenAPI 3.0 specification JSON/YAML string. |
Built for the machine economy by MPP Layer.
