{
  "openapi": "3.1.0",
  "info": {
    "title": "EQVPS API",
    "version": "1.0.0",
    "description": "No-KYC crypto VPS API. An AI agent can register, top up a crypto balance, order a VPS and manage it — no human, no card, no KYC. An MCP server (live, 26 tools) is also available at https://mcp.eqvps.com/mcp.",
    "contact": { "email": "info@eqvps.com", "url": "https://eqvps.com" }
  },
  "servers": [{ "url": "https://api.eqvps.com/api/v1/eqvps" }],
  "components": {
    "securitySchemes": {
      "bearerAuth": { "type": "http", "scheme": "bearer", "description": "Bearer token from POST /register (or the register_account MCP tool)." }
    }
  },
  "paths": {
    "/products": {
      "get": { "summary": "List plans (public)", "description": "All VPS plans with specs and USD prices. No auth.", "responses": { "200": { "description": "Array of plans" } } }
    },
    "/reviews": {
      "get": { "summary": "Approved customer reviews (public)", "responses": { "200": { "description": "Reviews + aggregate rating" } } }
    },
    "/register": {
      "post": { "summary": "Register (email only) and get a Bearer token",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["email"], "properties": { "email": { "type": "string", "format": "email" } } } } } },
        "responses": { "200": { "description": "{ token, token_type: Bearer }" }, "422": { "description": "Invalid/reserved email" } } }
    },
    "/otp/request": { "post": { "summary": "Request a login OTP by email", "responses": { "200": { "description": "OTP sent" } } } },
    "/otp/verify": { "post": { "summary": "Verify OTP, get a Bearer token", "responses": { "200": { "description": "{ token }" } } } },
    "/balance": { "get": { "summary": "Current prepaid balance", "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Balance in USD" } } } },
    "/balance/topup": {
      "post": { "summary": "Top up the balance in crypto", "security": [{ "bearerAuth": [] }],
        "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["amount"], "properties": { "amount": { "type": "number", "minimum": 3 } } } } } },
        "responses": { "200": { "description": "Invoice + crypto payment link (USDC/USDT/PYUSD on Base/Ethereum/Polygon)" } } }
    },
    "/orders": {
      "post": { "summary": "Order a VPS (paid from balance)", "security": [{ "bearerAuth": [] }],
        "description": "Provisions a VPS from the prepaid balance. See GET /products for available plan slugs and the order_vps MCP tool for the full field schema.",
        "responses": { "200": { "description": "Order created; VPS provisioned" }, "402": { "description": "Insufficient balance" } } }
    },
    "/orders/list": { "get": { "summary": "List your orders", "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Orders" } } } },
    "/services": { "get": { "summary": "List your active VPS", "security": [{ "bearerAuth": [] }], "responses": { "200": { "description": "Services" } } } },
    "/services/{id}": {
      "get": { "summary": "VPS status + SSH credentials", "security": [{ "bearerAuth": [] }],
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "IP, SSH user/port, root password (once ssh_ready), status, metrics" } } }
    },
    "/invoices/{id}/pay": {
      "post": { "summary": "Pay an invoice (from balance or crypto)", "security": [{ "bearerAuth": [] }],
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "Payment initiated/settled" } } }
    }
  },
  "externalDocs": { "description": "MCP endpoint + agent manifest", "url": "https://eqvps.com/.well-known/agent.json" }
}
