{
  "openapi": "3.1.0",
  "info": {
    "title": "LVL LTD Agent Skill Market API",
    "version": "1.6.0",
    "description": "ESP (Evaluate→Settle→Prove) + x402 skill marketplace. Free eval always before settlement. Success only via /api/proof. Source: catalog.json.",
    "contact": {
      "name": "lvl X, Inc.",
      "url": "https://lvlltd.com"
    }
  },
  "servers": [
    {
      "url": "https://lvlltd.com"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ready": {
      "get": {
        "summary": "Readiness",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/esp": {
      "get": {
        "summary": "ESP protocol — Evaluate → Settle → Prove",
        "description": "Without skill: protocol root. With skill: full cycle. phase=evaluate|settle|prove for slices. Free evaluate never requires payment.",
        "parameters": [
          {
            "name": "skill",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phase",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "evaluate",
                "settle",
                "prove",
                "cycle"
              ]
            }
          },
          {
            "name": "tx",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional txHash when phase=prove"
          }
        ],
        "responses": {
          "200": {
            "description": "ESP root, cycle, or phase slice"
          },
          "400": {
            "description": "Missing skill or unknown phase"
          }
        }
      }
    },
    "/api/judges": {
      "get": {
        "summary": "Recursive evaluator market (ESP judges)",
        "description": "List judge/verifier/critic skills with quality derived only from public proof ledger.",
        "responses": {
          "200": {
            "description": "Judge catalog"
          }
        }
      }
    },
    "/api/intent": {
      "get": {
        "summary": "NL intent → ranked skills",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/shop": {
      "get": {
        "summary": "Unified agent entry",
        "responses": {
          "200": {
            "description": "Shop payload"
          }
        }
      }
    },
    "/catalog.json": {
      "get": {
        "summary": "Full skill catalog (source of truth)",
        "description": "All 250 public skills with protocol surfaces",
        "responses": {
          "200": {
            "description": "Catalog"
          }
        }
      }
    },
    "/api/catalog": {
      "get": {
        "summary": "Search catalog",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_price",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results"
          }
        }
      }
    },
    "/api/pay": {
      "get": {
        "summary": "x402 payment challenge (HTTP 402)",
        "parameters": [
          {
            "name": "skill",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "agent-x402-first-buy": {
                "value": "agent-x402-first-buy",
                "summary": "Agent x402 First Buy: 5000 USDC base units"
              },
              "aie-premium-access-token": {
                "value": "aie-premium-access-token",
                "summary": "Premium Access Token Agent: 99000 USDC base units"
              },
              "lvl-agent-revenue-os-pack": {
                "value": "lvl-agent-revenue-os-pack",
                "summary": "LVL Agent Revenue OS Pack: 99000 USDC base units"
              },
              "seller-agent": {
                "value": "seller-agent",
                "summary": "Seller Agent: 99000 USDC base units"
              },
              "buyer-agent": {
                "value": "buyer-agent",
                "summary": "Buyer Agent: 99000 USDC base units"
              },
              "agent-ops-control-plane-pack": {
                "value": "agent-ops-control-plane-pack",
                "summary": "Agent Ops Control Plane Pack: 99000 USDC base units"
              },
              "x402-merchant-operating-system": {
                "value": "x402-merchant-operating-system",
                "summary": "x402 Merchant Operating System: 99000 USDC base units"
              },
              "music-video-release-dominator": {
                "value": "music-video-release-dominator",
                "summary": "Music Video Release Dominator: 99000 USDC base units"
              },
              "grant-dominator-v2": {
                "value": "grant-dominator-v2",
                "summary": "Grant Dominator v2: 99000 USDC base units"
              },
              "bundle-cofounder-dominators": {
                "value": "bundle-cofounder-dominators",
                "summary": "Cofounder Dominators Bundle: 99000 USDC base units"
              }
            }
          }
        ],
        "responses": {
          "402": {
            "description": "Payment required challenge"
          }
        }
      },
      "post": {
        "summary": "Unlock sealed pack after Base USDC payment",
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AP2-MANDATE",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional AP2 mandate"
          }
        ],
        "responses": {
          "200": {
            "description": "Unlocked sealed pack"
          },
          "402": {
            "description": "Payment required or verification failed"
          },
          "403": {
            "description": "AP2 mandate rejected"
          }
        }
      }
    },
    "/api/proof": {
      "get": {
        "summary": "On-chain unlock ledger — rows are self-funded test transactions, not customer purchases (never fabricated)",
        "responses": {
          "200": {
            "description": "Ledger"
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "summary": "MCP server info / tools list",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "MCP JSON-RPC",
        "responses": {
          "200": {
            "description": "JSON-RPC result"
          }
        }
      }
    },
    "/api/a2a": {
      "get": {
        "summary": "A2A agent card pointer",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "A2A JSON-RPC",
        "responses": {
          "200": {
            "description": "Task/Message"
          }
        }
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "summary": "Signed A2A Agent Card",
        "responses": {
          "200": {
            "description": "Agent Card"
          }
        }
      }
    },
    "/api/mandates": {
      "get": {
        "summary": "List AP2 mandates for wallet",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create/revoke AP2 mandate",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent-identity": {
      "get": {
        "summary": "ERC-8004 identity + local reputation (additive)",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Identity"
          }
        }
      }
    },
    "/api/access": {
      "get": {
        "summary": "Access resolution (one-time / sub / meter)",
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skill",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Access decision"
          }
        }
      }
    },
    "/api/subscribe": {
      "get": {
        "summary": "Recurring plans",
        "responses": {
          "200": {
            "description": "Plans"
          }
        }
      },
      "post": {
        "summary": "Start/renew/cancel subscription",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/meter": {
      "get": {
        "summary": "Meter budget / per-call challenge",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Set cap or record metered use",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/bundles": {
      "get": {
        "summary": "Composable skill stacks",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/trust": {
      "get": {
        "summary": "Trust scorecards",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/security": {
      "get": {
        "summary": "Security scan results",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/eval": {
      "get": {
        "summary": "Eval suite scores",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/signals": {
      "get": {
        "summary": "Confirmed demand signals",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/revenue": {
      "get": {
        "summary": "Revenue rollup (confirmed only)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/skills/{id}/outline.json": {
      "get": {
        "summary": "Free skill outline",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Outline"
          }
        }
      }
    },
    "/skills/{id}/sample.md": {
      "get": {
        "summary": "Free skill sample",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sample"
          }
        }
      }
    },
    "/api/acp/checkout_sessions": {
      "post": {
        "operationId": "acpCreateCheckoutSession",
        "summary": "ACP: create a Stripe card checkout session for one sealed pack (spec 2026-04-17). Amount is per item; see x-payment-info offers.",
        "tags": [
          "commerce"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "line_items"
                ],
                "properties": {
                  "line_items": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1,
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "enum": [
                            "ten-send",
                            "lvl-x402-merchant-os",
                            "lvl-cold-start-catalog-bootstrapper",
                            "csv-cleaner"
                          ]
                        },
                        "quantity": {
                          "const": 1
                        }
                      }
                    }
                  },
                  "buyer": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ACP checkout session (status ready_for_payment; pay at continue_url, Stripe hosted card checkout)"
          },
          "400": {
            "description": "Validation error"
          },
          "503": {
            "description": "Checkout not configured"
          }
        },
        "x-payment-info": {
          "intent": "charge",
          "method": "stripe",
          "amount": null,
          "currency": "usd",
          "description": "Per item (usd cents, one per session): ten-send 1900, lvl-x402-merchant-os 99, lvl-cold-start-catalog-bootstrapper 99, csv-cleaner 1000. Depends on line_items[0].",
          "x-offers-by-item": [
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "1900",
              "currency": "usd",
              "description": "ten-send (Stripe price price_1UNxB3E6xjYB5uvsRE5yqE1c), one per checkout session"
            },
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "99",
              "currency": "usd",
              "description": "lvl-x402-merchant-os (Stripe price price_1UNxBCE6xjYB5uvsmemgsfK1), one per checkout session"
            },
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "99",
              "currency": "usd",
              "description": "lvl-cold-start-catalog-bootstrapper (Stripe price price_1UNxBEE6xjYB5uvs6xidpkCA), one per checkout session"
            },
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "1000",
              "currency": "usd",
              "description": "csv-cleaner (Stripe price price_1UNxBHE6xjYB5uvsRv5HLe5s), one per checkout session"
            }
          ],
          "x-source": "Stripe price read (read-only, lvl X, Inc. acct_1TVJoWE6xjYB5uvs, livemode), 2026-10-12"
        }
      }
    },
    "/api/ucp/checkout-sessions": {
      "post": {
        "operationId": "ucpCreateCheckoutSession",
        "summary": "UCP dev.ucp.shopping.checkout: create a Stripe card checkout for one sealed pack (2026-08-25). Amount is per item; see x-payment-info offers.",
        "tags": [
          "commerce"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "line_items"
                ],
                "properties": {
                  "line_items": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1,
                    "items": {
                      "type": "object",
                      "properties": {
                        "item": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "enum": [
                                "ten-send",
                                "lvl-x402-merchant-os",
                                "lvl-cold-start-catalog-bootstrapper",
                                "csv-cleaner"
                              ]
                            }
                          }
                        },
                        "quantity": {
                          "const": 1
                        }
                      }
                    }
                  },
                  "buyer": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "UCP checkout (status requires_escalation; pay at continue_url, Stripe hosted card checkout)"
          },
          "400": {
            "description": "Validation error"
          },
          "503": {
            "description": "Checkout not configured"
          }
        },
        "x-payment-info": {
          "intent": "charge",
          "method": "stripe",
          "amount": null,
          "currency": "usd",
          "description": "Per item (usd cents, one per session): ten-send 1900, lvl-x402-merchant-os 99, lvl-cold-start-catalog-bootstrapper 99, csv-cleaner 1000. Depends on line_items[0].",
          "x-offers-by-item": [
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "1900",
              "currency": "usd",
              "description": "ten-send (Stripe price price_1UNxB3E6xjYB5uvsRE5yqE1c), one per checkout session"
            },
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "99",
              "currency": "usd",
              "description": "lvl-x402-merchant-os (Stripe price price_1UNxBCE6xjYB5uvsmemgsfK1), one per checkout session"
            },
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "99",
              "currency": "usd",
              "description": "lvl-cold-start-catalog-bootstrapper (Stripe price price_1UNxBEE6xjYB5uvs6xidpkCA), one per checkout session"
            },
            {
              "intent": "charge",
              "method": "stripe",
              "amount": "1000",
              "currency": "usd",
              "description": "csv-cleaner (Stripe price price_1UNxBHE6xjYB5uvsRv5HLe5s), one per checkout session"
            }
          ],
          "x-source": "Stripe price read (read-only, lvl X, Inc. acct_1TVJoWE6xjYB5uvs, livemode), 2026-10-12"
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Skill": {
        "type": "object",
        "required": [
          "id",
          "name",
          "price_usd",
          "price_label"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price_usd": {
            "type": "number"
          },
          "price_label": {
            "type": "string",
            "pattern": "^\\$[0-9]"
          },
          "category": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "x402": {
            "type": "object"
          },
          "protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "x-lvl-skill-count": 250,
  "x-lvl-source-of-truth": "catalog.json",
  "x-service-info": {
    "categories": [
      "commerce",
      "developer-tools",
      "ai-agents"
    ],
    "docs": {
      "homepage": "https://lvlltd.com/",
      "apiReference": "https://lvlltd.com/docs/",
      "llms": "https://lvlltd.com/llms.txt"
    }
  },
  "x-x402-resources": [
    {
      "skill_id": "agent-x402-first-buy",
      "name": "Agent x402 First Buy",
      "resource": "https://lvlltd.com/api/pay?skill=agent-x402-first-buy",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "price_usd": 0.005,
      "regular_price_usd": 0.05
    },
    {
      "skill_id": "aie-premium-access-token",
      "name": "Premium Access Token Agent",
      "resource": "https://lvlltd.com/api/pay?skill=aie-premium-access-token",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "lvl-agent-revenue-os-pack",
      "name": "LVL Agent Revenue OS Pack",
      "resource": "https://lvlltd.com/api/pay?skill=lvl-agent-revenue-os-pack",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "seller-agent",
      "name": "Seller Agent",
      "resource": "https://lvlltd.com/api/pay?skill=seller-agent",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "buyer-agent",
      "name": "Buyer Agent",
      "resource": "https://lvlltd.com/api/pay?skill=buyer-agent",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "agent-ops-control-plane-pack",
      "name": "Agent Ops Control Plane Pack",
      "resource": "https://lvlltd.com/api/pay?skill=agent-ops-control-plane-pack",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "x402-merchant-operating-system",
      "name": "x402 Merchant Operating System",
      "resource": "https://lvlltd.com/api/pay?skill=x402-merchant-operating-system",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "music-video-release-dominator",
      "name": "Music Video Release Dominator",
      "resource": "https://lvlltd.com/api/pay?skill=music-video-release-dominator",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "grant-dominator-v2",
      "name": "Grant Dominator v2",
      "resource": "https://lvlltd.com/api/pay?skill=grant-dominator-v2",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    },
    {
      "skill_id": "bundle-cofounder-dominators",
      "name": "Cofounder Dominators Bundle",
      "resource": "https://lvlltd.com/api/pay?skill=bundle-cofounder-dominators",
      "method": "GET",
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "99000",
      "price_usd": 0.099,
      "regular_price_usd": 0.99
    }
  ]
}
