{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Tools (x402)",
    "contact": {
      "url": "https://agent-tools.faling-bot.workers.dev/llms.txt",
      "email": "faling-bot@mail.grokbot.com"
    },
    "version": "1.0.0",
    "x-guidance": "POST /api/token-verdict with {tokenAddress} (Base 0x or Solana mint) for a SAFE/CAUTION/RISKY/DANGER grade with reasons from contract checks + DEX liquidity ($0.008). POST /api/api-lookup with {api, question?} to get any public API's base URL, auth, limits, key endpoints and spec/llms.txt links ($0.005). POST /api/api-endpoint with {api, query} to get the exact OpenAPI operation (method, path, params, body fields) for a task ($0.002). POST /api/site-contacts with {url} for public emails/phones/socials/tech of a website ($0.005). POST /api/solana-token with {mint} for an SPL token snapshot and rug-risk flags ($0.003). These four have a free tier: add ?trial=1 (10/day/IP). POST /api/markdown with {url} to get clean Markdown of any public web page ($0.002). POST /api/summarize with {text} or {url} for a bullet summary ($0.003). Pay with x402 (USDC on Base or Solana). Bad input is rejected with 400 before settlement (not charged).",
    "description": "Pay-per-call web tools for AI agents. No signup, no API key: pay USDC on Base or Solana per request via x402."
  },
  "servers": [
    {
      "url": "https://agent-tools.faling-bot.workers.dev"
    }
  ],
  "paths": {
    "/api/markdown": {
      "post": {
        "operationId": "url_to_markdown",
        "summary": "Fetch a public web page and return clean Markdown (title, main text, links). Input: {url}.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002000"
          },
          "protocols": [
            {
              "x402": {
                "network": "base",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            },
            {
              "x402": {
                "network": "solana",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "http(s) URL of the page"
                  },
                  "max_chars": {
                    "type": "number",
                    "description": "truncate output (default 20000, max 50000)"
                  }
                }
              },
              "example": {
                "url": "https://example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "markdown": {
                      "type": "string"
                    },
                    "chars": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad input (no charge)"
          },
          "402": {
            "description": "x402 Payment Required: body + PAYMENT-REQUIRED header (base64) list accepted payment terms; retry with PAYMENT-SIGNATURE."
          }
        }
      }
    },
    "/api/summarize": {
      "post": {
        "operationId": "summarize",
        "summary": "Summarize text or a web page URL into concise bullet points (LLM, Llama 3.1 8B fp8). Input: {text} or {url}, optional {max_words}.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003000"
          },
          "protocols": [
            {
              "x402": {
                "network": "base",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            },
            {
              "x402": {
                "network": "solana",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "text to summarize (max 12000 chars)"
                  },
                  "url": {
                    "type": "string",
                    "description": "or a page URL to fetch and summarize"
                  },
                  "max_words": {
                    "type": "number"
                  }
                }
              },
              "example": {
                "url": "https://example.com",
                "max_words": 80
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "source_chars": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad input (no charge)"
          },
          "402": {
            "description": "x402 Payment Required: body + PAYMENT-REQUIRED header (base64) list accepted payment terms; retry with PAYMENT-SIGNATURE."
          }
        }
      }
    },
    "/api/site-contacts": {
      "post": {
        "operationId": "site_contacts",
        "summary": "Company/website enrichment: crawl a domain's homepage plus contact/about pages and return public emails, phone numbers, social profiles (X, LinkedIn, GitHub, etc.), page title/description and detected tech. Input: {url} or {domain}.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {
                "network": "base",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            },
            {
              "x402": {
                "network": "solana",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "website URL or bare domain"
                  },
                  "domain": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "url": "https://cloudflare.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "emails": {
                      "type": "array"
                    },
                    "phones": {
                      "type": "array"
                    },
                    "socials": {
                      "type": "object"
                    },
                    "tech": {
                      "type": "array"
                    },
                    "pages_checked": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad input (no charge)"
          },
          "402": {
            "description": "x402 Payment Required: body + PAYMENT-REQUIRED header (base64) list accepted payment terms; retry with PAYMENT-SIGNATURE."
          }
        }
      }
    },
    "/api/solana-token": {
      "post": {
        "operationId": "solana_token_check",
        "summary": "Solana SPL token snapshot + rug-risk flags: name/symbol, supply, decimals, USD price (when indexed), mint & freeze authority status, top-10 holder concentration, token program. Input: {mint}.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003000"
          },
          "protocols": [
            {
              "x402": {
                "network": "base",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            },
            {
              "x402": {
                "network": "solana",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mint"
                ],
                "properties": {
                  "mint": {
                    "type": "string",
                    "description": "SPL token mint address"
                  }
                }
              },
              "example": {
                "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mint": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "supply": {
                      "type": "number"
                    },
                    "price_usd": {
                      "type": "number"
                    },
                    "mint_authority": {
                      "type": "string"
                    },
                    "freeze_authority": {
                      "type": "string"
                    },
                    "top10_pct": {
                      "type": "number"
                    },
                    "risk_flags": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad input (no charge)"
          },
          "402": {
            "description": "x402 Payment Required: body + PAYMENT-REQUIRED header (base64) list accepted payment terms; retry with PAYMENT-SIGNATURE."
          }
        }
      }
    },
    "/api/api-lookup": {
      "post": {
        "operationId": "api_lookup",
        "summary": "Look up any public API for an agent: finds its OpenAPI spec and llms.txt/docs, and returns base URL, auth scheme, rate-limit and error notes, key endpoints and source links (LLM-condensed, cached 7d). Input: {api} (name like 'stripe', a domain, or docs URL), optional {question}.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {
                "network": "base",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            },
            {
              "x402": {
                "network": "solana",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "tags": [
          "Developer"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "api"
                ],
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "API name, domain or docs URL"
                  },
                  "question": {
                    "type": "string",
                    "description": "optional focus, e.g. 'how to create a payment'"
                  }
                }
              },
              "example": {
                "api": "stripe",
                "question": "create a customer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "api": {
                      "type": "string"
                    },
                    "base_url": {
                      "type": "string"
                    },
                    "auth": {
                      "type": "string"
                    },
                    "rate_limits": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "string"
                    },
                    "key_endpoints": {
                      "type": "array"
                    },
                    "openapi_url": {
                      "type": "string"
                    },
                    "llms_txt_url": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad input (no charge)"
          },
          "402": {
            "description": "x402 Payment Required: body + PAYMENT-REQUIRED header (base64) list accepted payment terms; retry with PAYMENT-SIGNATURE."
          }
        }
      }
    },
    "/api/api-endpoint": {
      "post": {
        "operationId": "api_endpoint",
        "summary": "Find the exact operation in a public API's OpenAPI spec for a task: method, path, parameters, request body fields, auth. Deterministic search, no LLM. Input: {api, query}. Optional {spec_url} if you already know the spec.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002000"
          },
          "protocols": [
            {
              "x402": {
                "network": "base",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            },
            {
              "x402": {
                "network": "solana",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "tags": [
          "Developer"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "api",
                  "query"
                ],
                "properties": {
                  "api": {
                    "type": "string"
                  },
                  "query": {
                    "type": "string",
                    "description": "what you want to do, e.g. 'list repository issues'"
                  },
                  "spec_url": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "api": "github",
                "query": "list issues for a repository"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "spec_url": {
                      "type": "string"
                    },
                    "base_url": {
                      "type": "string"
                    },
                    "matches": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad input (no charge)"
          },
          "402": {
            "description": "x402 Payment Required: body + PAYMENT-REQUIRED header (base64) list accepted payment terms; retry with PAYMENT-SIGNATURE."
          }
        }
      }
    },
    "/api/token-verdict": {
      "post": {
        "operationId": "token_verdict",
        "summary": "Fast verdict on a Base (ERC-20) or Solana token: grade SAFE / CAUTION / RISKY / DANGER plus reasons, built from live on-chain contract checks (proxy/upgradeable, owner, bytecode size, mint/freeze authority on Solana) and DEX market data across all pools (liquidity, 24h volume, buys/sells, price change, pair age, FDV). Input: {tokenAddress, chain?: 'base'|'solana'} (auto-detected). Not financial advice.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.008000"
          },
          "protocols": [
            {
              "x402": {
                "network": "base",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            },
            {
              "x402": {
                "network": "solana",
                "asset": "USDC",
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tokenAddress"
                ],
                "properties": {
                  "tokenAddress": {
                    "type": "string",
                    "description": "Base 0x token contract or Solana mint"
                  },
                  "chain": {
                    "type": "string",
                    "enum": [
                      "base",
                      "solana"
                    ]
                  }
                }
              },
              "example": {
                "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "chain": "base"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "grade": {
                      "type": "string",
                      "enum": [
                        "SAFE",
                        "CAUTION",
                        "RISKY",
                        "DANGER"
                      ]
                    },
                    "score": {
                      "type": "number"
                    },
                    "one_liner": {
                      "type": "string"
                    },
                    "reasons": {
                      "type": "array"
                    },
                    "token": {
                      "type": "object"
                    },
                    "market": {
                      "type": "object"
                    },
                    "contract": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad input (no charge)"
          },
          "402": {
            "description": "x402 Payment Required: body + PAYMENT-REQUIRED header (base64) list accepted payment terms; retry with PAYMENT-SIGNATURE."
          }
        }
      }
    }
  }
}