{
  "openapi": "3.1.0",
  "info": {
    "title": "Aixpa public API (read-only)",
    "version": "1.0.0",
    "summary": "Public reads of the Aixpa hub: status, crypto rates, fees and limits, and a read-only MCP endpoint.",
    "description": "Everything here can be called without a key and only reads. Open CORS; JSON answers carry `X-Robots-Tag: noindex`.\n\nThe project API (invoices, deposits, payouts, webhooks) needs a project secret key and is described in the integration guide: https://aixpa.store/integration\n\nAgents: https://aixpa.store/docs/agents · https://aixpa.store/llms.txt\n\nAutomated sign-up, sign-in or dashboard use breaks the Terms.",
    "termsOfService": "https://aixpa.store/terms"
  },
  "servers": [
    {
      "url": "https://api.aixpa.store"
    }
  ],
  "externalDocs": {
    "description": "Integration guide",
    "url": "https://aixpa.store/integration"
  },
  "tags": [
    {
      "name": "Public reads",
      "description": "No key, cached, safe to poll every few minutes."
    },
    {
      "name": "MCP",
      "description": "Model Context Protocol, read-only tools."
    }
  ],
  "paths": {
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Component status",
        "description": "Live health of every hub component: API, database, payment gateways, payout rails, rates and each sign-in method. Probed at most once a minute.",
        "tags": [
          "Public reads"
        ],
        "responses": {
          "200": {
            "description": "The current answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/facts": {
      "get": {
        "operationId": "getFacts",
        "summary": "Fees, limits, modules and network totals",
        "description": "The public numbers of the hub: payment fee, revenue shares, minimums, payout limits and methods, the module registry and network totals (from a floor up, never per project). Rebuilt at most hourly.",
        "tags": [
          "Public reads"
        ],
        "responses": {
          "200": {
            "description": "The current answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Facts"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "How long the answer may be kept.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Robots-Tag": {
                "description": "noindex: data, not a page.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/rates": {
      "get": {
        "operationId": "getRates",
        "summary": "Crypto/USD rates",
        "description": "Crypto prices from several public sources with fallback, refreshed in the background. A price marked stale is the last good one.",
        "tags": [
          "Public reads"
        ],
        "responses": {
          "200": {
            "description": "The current answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rates"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "tags": [
          "MCP"
        ],
        "summary": "Read-only MCP endpoint (JSON-RPC 2.0, Streamable HTTP)",
        "description": "One JSON-RPC message per POST, one JSON answer per request (`application/json`); a notification is answered 202 with no body; GET answers 405 (no server stream); no sessions. Protocol revisions: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26 — `initialize` negotiates 2025-11-25 / 2025-06-18 / 2025-03-26, a request with `params._meta[\"io.modelcontextprotocol/protocolVersion\"]` and the `MCP-Protocol-Version`, `Mcp-Method` (and for `tools/call` `Mcp-Name`) headers is served as 2026-07-28. Server: aixpa-hub 1.0.0.\n\nTools (all read-only):\n- `get_status` — Live health of every hub component (API, database, payment gateways, payout rails, rates, each sign-in method). Same data as GET https://api.aixpa.store/v1/status.\n- `get_rates` — Crypto/USD prices the hub serves to connected sites, refreshed every few minutes; stale: true marks an old price. Same data as GET https://api.aixpa.store/v1/rates.\n- `get_facts` — The public numbers of the hub: payment fee, revenue shares, minimums, payout limits and methods, the module registry and network totals (shown only from a floor up). Same data as GET https://api.aixpa.store/v1/facts.\n- `list_payment_methods` — Every coin and network a project can be paid in: its lane (invoice, permanent address or FaucetPay), the live minimum in USD and whether it can be paid right now.\n- `search_docs` — Search the hub documentation (home, features, pricing, integration guide, agent guide) and get the matching passages with their page URLs.\n\nLimit: 60 requests per 60 s per IP address.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/call",
                "params": {
                  "name": "get_facts",
                  "arguments": {
                    "section": "payments"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The JSON-RPC answer (a result, or an error such as -32601 method not found, -32602 invalid params).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "A notification was accepted (no body)."
          },
          "400": {
            "description": "Not JSON-RPC (-32700, -32600), or for a request with per-request metadata: a header that does not match the body (-32020) or an unsupported protocol version (-32022).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown method of a request with per-request metadata (-32601).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests from one IP address (60 per 60 s on /mcp).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "description": "A stable error code, e.g. too_many_requests."
          }
        },
        "required": [
          "ok",
          "error"
        ]
      },
      "Status": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "partial_outage"
            ],
            "description": "Worst state of the configured components."
          },
          "components": {
            "type": "object",
            "description": "State per component: api, database, payments.<gateway>, rates, payouts.<rail>, login.<method>.",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "operational",
                "degraded",
                "down",
                "not_configured"
              ]
            }
          },
          "commit": {
            "type": "string",
            "description": "Short git commit the API runs."
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the probes ran (cached for a minute)."
          }
        },
        "required": [
          "status",
          "components",
          "commit",
          "startedAt",
          "checkedAt"
        ]
      },
      "Rates": {
        "type": "object",
        "properties": {
          "base": {
            "type": "string",
            "const": "USD"
          },
          "rates": {
            "type": "object",
            "description": "Coin symbol -> price.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "usd": {
                  "type": "number",
                  "description": "Price of one coin in USD."
                },
                "updatedAt": {
                  "type": "integer",
                  "description": "Unix time in milliseconds."
                },
                "stale": {
                  "type": "boolean",
                  "description": "True when the price is older than the refresh window allows."
                }
              },
              "required": [
                "usd",
                "updatedAt",
                "stale"
              ]
            }
          }
        },
        "required": [
          "base",
          "rates"
        ]
      },
      "NetworkTotal": {
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Null below the floor (shown as a dash)."
          },
          "floor": {
            "type": "integer"
          }
        },
        "required": [
          "value",
          "floor"
        ]
      },
      "Module": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "beta",
              "planned"
            ]
          },
          "statusLabel": {
            "type": "string"
          },
          "group": {
            "type": "string",
            "enum": [
              "core",
              "platform",
              "roadmap"
            ]
          },
          "summary": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "statusLabel",
          "group",
          "summary"
        ]
      },
      "Facts": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ttlSeconds": {
            "type": "integer",
            "description": "The answer is rebuilt at most this often."
          },
          "currency": {
            "type": "string",
            "const": "USD"
          },
          "payments": {
            "type": "object",
            "properties": {
              "feeBps": {
                "type": "integer",
                "description": "Hub fee on a payment to a project, in basis points of the amount received."
              },
              "feePct": {
                "type": "number"
              },
              "walletTopUpFeeBps": {
                "type": "integer",
                "description": "Hub fee on a top-up of an account balance (advertisers)."
              },
              "walletTopUpFeePct": {
                "type": "number"
              },
              "minUsd": {
                "type": "object",
                "properties": {
                  "faucetpay": {
                    "type": "number"
                  },
                  "address": {
                    "type": "number"
                  },
                  "invoice": {
                    "type": "number"
                  }
                },
                "required": [
                  "faucetpay",
                  "address",
                  "invoice"
                ]
              },
              "coinCount": {
                "type": "integer"
              },
              "methodCount": {
                "type": "integer"
              },
              "coins": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "methods": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "coin": {
                      "type": "string"
                    },
                    "network": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "coin",
                    "network"
                  ]
                }
              }
            },
            "required": [
              "feeBps",
              "feePct",
              "walletTopUpFeeBps",
              "walletTopUpFeePct",
              "minUsd",
              "coinCount",
              "methodCount",
              "coins",
              "methods"
            ]
          },
          "ads": {
            "type": "object",
            "properties": {
              "publisherShareBps": {
                "type": "integer"
              },
              "publisherSharePct": {
                "type": "number"
              },
              "platformSharePct": {
                "type": "number"
              },
              "minBidUsd": {
                "type": "object",
                "properties": {
                  "ptc": {
                    "type": "number",
                    "description": "Per view."
                  },
                  "banner": {
                    "type": "number",
                    "description": "Per 1,000 views."
                  },
                  "text": {
                    "type": "number"
                  },
                  "popunder": {
                    "type": "number"
                  }
                },
                "required": [
                  "ptc",
                  "banner",
                  "text",
                  "popunder"
                ]
              },
              "ptcSeconds": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "integer"
                  },
                  "max": {
                    "type": "integer"
                  }
                },
                "required": [
                  "min",
                  "max"
                ]
              },
              "bannerSizes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "publisherShareBps",
              "publisherSharePct",
              "platformSharePct",
              "minBidUsd",
              "ptcSeconds",
              "bannerSizes"
            ]
          },
          "offerwall": {
            "type": "object",
            "properties": {
              "publisherShareBps": {
                "type": "integer"
              },
              "publisherSharePct": {
                "type": "number"
              }
            },
            "required": [
              "publisherShareBps",
              "publisherSharePct"
            ]
          },
          "payouts": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "minUsd": {
                "type": "number"
              },
              "maxUsd": {
                "type": "number"
              },
              "dailyUsd": {
                "type": "number"
              },
              "feeUsd": {
                "type": "number"
              },
              "methods": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "coins": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "enabled",
                    "coins"
                  ]
                }
              }
            },
            "required": [
              "enabled",
              "minUsd",
              "maxUsd",
              "dailyUsd",
              "feeUsd",
              "methods"
            ]
          },
          "modules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Module"
            }
          },
          "network": {
            "type": "object",
            "properties": {
              "projectsLive": {
                "$ref": "#/components/schemas/NetworkTotal"
              },
              "invoicesSettled30d": {
                "$ref": "#/components/schemas/NetworkTotal"
              },
              "payouts30d": {
                "$ref": "#/components/schemas/NetworkTotal"
              },
              "adImpressionsToday": {
                "$ref": "#/components/schemas/NetworkTotal"
              }
            },
            "required": [
              "projectsLive",
              "invoicesSettled30d",
              "payouts30d",
              "adImpressionsToday"
            ]
          },
          "text": {
            "type": "object",
            "description": "Display text per leaf path (e.g. \"payments.feePct\": \"0.5%\"), as the hub pages show it.",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "generatedAt",
          "ttlSeconds",
          "currency",
          "payments",
          "ads",
          "offerwall",
          "payouts",
          "modules",
          "network",
          "text"
        ]
      },
      "JsonRpcRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Left out for a notification (answered 202, no body)."
          },
          "method": {
            "type": "string",
            "examples": [
              "initialize",
              "tools/list",
              "tools/call",
              "server/discover",
              "ping"
            ]
          },
          "params": {
            "type": "object"
          }
        },
        "required": [
          "jsonrpc",
          "method"
        ]
      },
      "JsonRpcResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "data": {}
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "jsonrpc",
          "id"
        ]
      }
    }
  }
}
