{
  "openapi": "3.1.0",
  "info": {
    "title": "Second Wind — AWS tools for agents, paid per call",
    "summary": "The exact AWS tool you need from GitHub — without downloading all the bullshit.",
    "description": "Second Wind sells small, specific AWS tools to autonomous agents: the tool object itself plus source, license, and content hash. Every paid endpoint is session-less: discover, pay USDC on Base via x402 v2, use.",
    "version": "1.2.0",
    "x-audience": "autonomous_agents",
    "contact": {
      "url": "https://secondwindai.com/llms.txt"
    }
  },
  "servers": [
    {
      "url": "https://secondwindai.com"
    }
  ],
  "components": {
    "schemas": {
      "ToolStub": {
        "type": "object",
        "description": "One live tool as listed on the free tools listing.",
        "properties": {
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "price_usd": {
            "type": "number"
          },
          "summary": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The paid endpoint for this tool."
          }
        },
        "required": [
          "sku",
          "name",
          "price_usd",
          "summary",
          "url"
        ]
      },
      "ToolsListing": {
        "type": "object",
        "description": "Free listing of every live tool.",
        "properties": {
          "service": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "total_live": {
            "type": "integer"
          },
          "payment": {
            "type": "object",
            "properties": {
              "rail": {
                "type": "string",
                "const": "x402"
              },
              "network": {
                "type": "string"
              },
              "asset": {
                "type": "string",
                "const": "USDC"
              },
              "how": {
                "type": "string"
              }
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolStub"
            }
          }
        },
        "required": [
          "service",
          "total_live",
          "tools"
        ]
      },
      "Proof": {
        "type": "object",
        "description": "Free liveness proof: inventory reachability, live tool count, payment rail configuration.",
        "properties": {
          "service": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "degraded"
            ]
          },
          "tools_live": {
            "type": [
              "integer",
              "null"
            ]
          },
          "payment": {
            "type": "object",
            "properties": {
              "rail": {
                "type": "string",
                "const": "x402"
              },
              "x402Version": {
                "type": "integer",
                "const": 2
              },
              "network": {
                "type": "string"
              },
              "asset": {
                "type": "string",
                "const": "USDC"
              },
              "payTo_configured": {
                "type": "boolean"
              },
              "facilitator_configured": {
                "type": "boolean"
              }
            }
          },
          "discovery": {
            "type": "object",
            "properties": {
              "tools": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "x402_resources": {
                "type": "string",
                "format": "uri"
              },
              "well_known": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        },
        "required": [
          "service",
          "status"
        ]
      },
      "ResolvedCapability": {
        "type": "object",
        "description": "The paid response: the resolved, invocable capability — guidance (when/how/why), the composition graph around it (steps, composes_with, requires, alternatives, each with the one-line why), and invocation instructions. Not a file dump.",
        "properties": {
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "guidance": {
            "type": "string",
            "description": "The editorial layer: when to reach for this, wiring, gotchas."
          },
          "composition": {
            "type": "object",
            "description": "The item's wired graph neighborhood — curation as data.",
            "properties": {
              "steps": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "composes_with": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "requires": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "alternatives": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "pairs_with": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "part_of": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "invoke": {
            "type": "object",
            "description": "How to run it — POST body contract for execution items, deliberate artifact fetch for file items."
          },
          "source": {
            "type": "object",
            "properties": {
              "repo": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "license_spdx": {
                "type": "string"
              },
              "provenance": {
                "type": "string"
              }
            }
          },
          "content_hash": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "sku",
          "name",
          "guidance",
          "composition"
        ]
      },
      "PaymentRequired402": {
        "type": "object",
        "description": "x402 v2 unpaid response body (the protocol object rides base64-encoded in the PAYMENT-REQUIRED header).",
        "properties": {
          "x402Version": {
            "type": "integer",
            "const": 2
          },
          "error": {
            "type": "string"
          },
          "resource": {
            "type": "object"
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scheme": {
                  "type": "string"
                },
                "network": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                },
                "asset": {
                  "type": "string"
                },
                "payTo": {
                  "type": "string"
                },
                "maxTimeoutSeconds": {
                  "type": "integer"
                },
                "extra": {
                  "type": "object"
                }
              },
              "required": [
                "scheme",
                "network"
              ]
            }
          },
          "extensions": {
            "type": "object"
          }
        },
        "required": [
          "x402Version",
          "accepts"
        ]
      },
      "NotFound": {
        "type": "object",
        "description": "Unknown SKU or slug.",
        "properties": {
          "error": {
            "type": "string",
            "const": "unknown_sku"
          },
          "tools": {
            "type": "string",
            "description": "Path of the free tools listing."
          }
        },
        "required": [
          "error"
        ]
      },
      "MethodNotAllowed": {
        "type": "object",
        "description": "Teaching 405: every surface is GET.",
        "properties": {
          "error": {
            "type": "string",
            "const": "method_not_allowed"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "docs": {
            "type": "object"
          }
        },
        "required": [
          "error",
          "method",
          "path"
        ]
      }
    },
    "securitySchemes": {
      "x402Payment": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 v2. First call returns 402 + PAYMENT-REQUIRED header (base64 JSON). Sign USDC on Base (eip155:8453, exact scheme) and retry the same URL with PAYMENT-SIGNATURE."
      }
    }
  },
  "paths": {
    "/api/x402/lambda-powertools-idempotency": {
      "get": {
        "operationId": "lambda-powertools-idempotency_get",
        "summary": "Idempotent handlers backed by DynamoDB - a retried event returns the first result instead of executing twice. Full wirin",
        "description": "Idempotent handlers backed by DynamoDB - a retried event returns the first result instead of executing twice. Full wiring for Python, TypeScript, Java, and .NET. Session-less x402 paid endpoint — pay once (USDC) and receive the resolved capability: guidance, composition, invocation. ~$0.1 USDC.",
        "tags": [
          "paid",
          "x402",
          "tool",
          "lambda"
        ],
        "x-price-usd": 0.1,
        "security": [
          {
            "x402Payment": []
          }
        ],
        "responses": {
          "200": {
            "description": "Paid. Body carries the resolved capability: guidance, composition graph, invocation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedCapability"
                }
              }
            }
          },
          "402": {
            "description": "Unpaid. PAYMENT-REQUIRED header carries base64 JSON payment requirements (x402 v2); retry the same URL with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired402"
                }
              }
            }
          },
          "404": {
            "description": "Unknown SKU or slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "405": {
            "description": "Wrong method. Every surface is GET.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MethodNotAllowed"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/sepolia-proof-tool": {
      "get": {
        "operationId": "sepolia-proof-tool_get",
        "summary": "Test item for the Base Sepolia payment proof. Costs one cent of valueless test USDC.",
        "description": "Test item for the Base Sepolia payment proof. Costs one cent of valueless test USDC. Session-less x402 paid endpoint — pay once (USDC) and receive the resolved capability: guidance, composition, invocation. ~$0.01 USDC.",
        "tags": [
          "paid",
          "x402",
          "tool",
          "proof"
        ],
        "x-price-usd": 0.01,
        "security": [
          {
            "x402Payment": []
          }
        ],
        "responses": {
          "200": {
            "description": "Paid. Body carries the resolved capability: guidance, composition graph, invocation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedCapability"
                }
              }
            }
          },
          "402": {
            "description": "Unpaid. PAYMENT-REQUIRED header carries base64 JSON payment requirements (x402 v2); retry the same URL with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired402"
                }
              }
            }
          },
          "404": {
            "description": "Unknown SKU or slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "405": {
            "description": "Wrong method. Every surface is GET.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MethodNotAllowed"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/{sku}": {
      "get": {
        "operationId": "tool_by_sku_get",
        "summary": "Paid tool by SKU or slug (x402).",
        "description": "Session-less paid endpoint. First call returns 402 with payment requirements in the PAYMENT-REQUIRED header; sign USDC on Base and retry the same URL with PAYMENT-SIGNATURE.",
        "tags": [
          "paid",
          "x402"
        ],
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "required": true,
            "description": "Tool SKU or slug — both resolve.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "x402Payment": []
          }
        ],
        "responses": {
          "200": {
            "description": "Paid. Body carries the resolved capability: guidance, composition graph, invocation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedCapability"
                }
              }
            }
          },
          "402": {
            "description": "Unpaid. PAYMENT-REQUIRED header carries base64 JSON payment requirements (x402 v2); retry the same URL with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired402"
                }
              }
            }
          },
          "404": {
            "description": "Unknown SKU or slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound"
                }
              }
            }
          },
          "405": {
            "description": "Wrong method. Every surface is GET.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MethodNotAllowed"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools": {
      "get": {
        "operationId": "tools_get",
        "summary": "Free listing of every live tool with SKU, type, service, price, and summary.",
        "description": "Free, unpaid surface. The place to browse before paying.",
        "tags": [
          "free",
          "discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The live tools listing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolsListing"
                }
              }
            }
          },
          "405": {
            "description": "Wrong method.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MethodNotAllowed"
                }
              }
            }
          }
        }
      }
    },
    "/api/proof": {
      "get": {
        "operationId": "proof_get",
        "summary": "Free liveness proof: live tool count, payment rail configuration, inventory reachability.",
        "description": "Free, unpaid surface. Confirm the service is live before spending.",
        "tags": [
          "free",
          "discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Liveness proof.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Proof"
                }
              }
            }
          },
          "405": {
            "description": "Wrong method.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MethodNotAllowed"
                }
              }
            }
          }
        }
      }
    }
  }
}