Reference

API Reference

Complete reference for all MPP HTTP endpoints. The base URL for all API calls is:

https://mpplayerprotocol.com

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.

POST/api/v1/gateway/:path

Proxy 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
NameTypeRequiredDescription
AuthorizationstringNoPayment signature=<tx_signature> — Omit for initial request to receive 402 challenge.
Content-TypestringNoapplication/json — Required when sending a JSON body.
Path Parameters
NameTypeRequiredDescription
:pathstringYesThe endpoint path registered in the MPP Registry (e.g., defi-sentiment).
Response Codes
200Success. Returns the upstream provider's response.
402Payment Required. No Authorization header provided. Check WWW-Authenticate header for payment details.
403Payment verification failed. The signature is invalid or the amounts don't match.
404Endpoint not found in the registry or it is deactivated.
409Conflict. The transaction signature has already been consumed (Replay Attack prevented).
502Bad Gateway. The upstream provider's server is unreachable.

Registry

The public decentralized registry of all active MPP endpoints.

GET/api/v1/registry

List All Endpoints

Returns a paginated list of all publicly active AI agent endpoints registered on the MPP platform.

Query Parameters
NameTypeRequiredDescription
categorystringNoFilter by category. Options: Agent, Trading, Analytics, Media, Utility.
searchstringNoFull-text search across name and description fields.
limitnumberNoNumber of results per page. Default: 20. Max: 100.
offsetnumberNoPagination 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.

GET/api/v1/publish

List My Published APIs

Returns all APIs published by the authenticated wallet, including live trust metrics and total earnings.

Request Headers
NameTypeRequiredDescription
X-WalletstringYesThe provider's Solana wallet public key.
POST/api/v1/publish

Publish a New API

Registers a new AI agent endpoint on the MPP registry. The endpoint becomes immediately discoverable.

Request Headers
NameTypeRequiredDescription
X-WalletstringYesThe provider's Solana wallet public key.
Content-TypestringYesapplication/json
Request Body
NameTypeRequiredDescription
namestringYesHuman-readable name for the API (e.g., DeFi Sentiment Agent).
descriptionstringYesShort description of what the agent does.
endpoint_pathstringYesUnique path slug (e.g., /v1/defi-sentiment). Must be globally unique.
upstream_urlstringYesThe real URL of your server. The Gateway will proxy requests here after payment.
price_numericnumberYesPrice per request (e.g., 0.5).
currencystringYesPayment token. One of: SOL, USDC, USDT.
categorystringYesCategory. One of: Agent, Trading, Analytics, Media, Utility.
methodstringNoHTTP method for your endpoint. Default: POST.
documentation_urlstringNoExternal URL for your full API documentation.
openapi_schemastringNoOpenAPI 3.0 specification JSON/YAML string.

Built for the machine economy by MPP Layer.