{
  "x402Version": 2,
  "service": "X402 Solver Gateway",
  "description": "Gateway to AI solver services with x402 payments.",
  "payment": "x402",
  "networks": [
    "eip155:8453"
  ],
  "pricing": "dynamic; the exact amount is returned in the 402 response for each endpoint",
  "offers": [
    {
      "id": "service",
      "endpoint": "/",
      "pricing": "see 402 response"
    }
  ],
  "payTo": "0xA5E6eB31868A85127B1ED82b8C760193356206ED",
  "version": 2,
  "name": "X402 Solver Gateway",
  "resources": [
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/extract",
      "type": "http",
      "method": "GET",
      "description": "Fetch a URL and return clean text/markdown. Use to read a web page cheaply.",
      "price_usd": "0.003",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "GET",
              "queryParams": {
                "url": "https://example.com"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "url": "https://example.com",
                "markdown": "..."
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET"
                    ]
                  },
                  "queryParams": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "http(s) URL"
                      }
                    },
                    "required": [
                      "url"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/scan/secrets",
      "type": "http",
      "method": "POST",
      "description": "Detect leaked API keys, tokens and private keys in text before publishing.",
      "price_usd": "0.002",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "text": "const k='AKIA...'"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "safe_to_publish": false,
                "findings": [
                  {
                    "type": "aws_key"
                  }
                ]
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "description": "Text or code to scan"
                      }
                    },
                    "required": [
                      "text"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/audit/solidity",
      "type": "http",
      "method": "POST",
      "description": "Static Solidity audit for common issues (tx.origin, delegatecall, reentrancy patterns).",
      "price_usd": "0.02",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "code": "contract A {}"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "verdict": "PASS",
                "issues": []
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Solidity source"
                      }
                    },
                    "required": [
                      "code"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/token",
      "type": "http",
      "method": "GET",
      "description": "Token risk report from DexScreener liquidity and volume signals.",
      "price_usd": "0.005",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "GET",
              "queryParams": {
                "address": "0x4200000000000000000000000000000000000006"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "risk_level": "LOW",
                "risk_signals": [],
                "liquidity_usd": 1000000
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET"
                    ]
                  },
                  "queryParams": {
                    "type": "object",
                    "properties": {
                      "address": {
                        "type": "string",
                        "description": "Token contract address"
                      }
                    },
                    "required": [
                      "address"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/token/trading",
      "type": "http",
      "method": "GET",
      "description": "Current price, liquidity and 24h volume of a token via DexScreener.",
      "price_usd": "0.005",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "GET",
              "queryParams": {
                "address": "0x4200000000000000000000000000000000000006"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "price_usd": "3000",
                "liquidity_usd": 1000000,
                "volume_24h_usd": 500000
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET"
                    ]
                  },
                  "queryParams": {
                    "type": "object",
                    "properties": {
                      "address": {
                        "type": "string",
                        "description": "Token contract address"
                      }
                    },
                    "required": [
                      "address"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/chainlink/price",
      "type": "http",
      "method": "GET",
      "description": "On-chain Chainlink BTC/USD price.",
      "price_usd": "0.003",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "GET"
            },
            "output": {
              "type": "json",
              "example": {
                "pair": "BTC/USD",
                "price_usd": 67000,
                "source": "Chainlink on-chain"
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/execute/swap",
      "type": "http",
      "method": "POST",
      "description": "Builds an unsigned swap instruction payload. Does not move funds.",
      "price_usd": "0.01",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "from_token": "USDC",
                "to_token": "WETH",
                "amount": "10",
                "recipient": "0x0000000000000000000000000000000000000001",
                "chain_id": 8453
              }
            },
            "output": {
              "type": "json",
              "example": {
                "swap_payload": {
                  "chain_id": 8453
                }
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "from_token": {
                        "type": "string",
                        "description": "Token to sell"
                      },
                      "to_token": {
                        "type": "string",
                        "description": "Token to buy"
                      },
                      "amount": {
                        "type": "string",
                        "description": "Amount"
                      },
                      "recipient": {
                        "type": "string",
                        "description": "Recipient address"
                      },
                      "chain_id": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "from_token",
                      "to_token",
                      "amount",
                      "recipient"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/ai/chat",
      "type": "http",
      "method": "POST",
      "description": "General AI chat completion (Llama 3.3 70B with automatic fallback).",
      "price_usd": "0.003",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "prompt": "Explain x402 in one line"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "response": "..."
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "prompt": {
                        "type": "string",
                        "description": "User prompt"
                      }
                    },
                    "required": [
                      "prompt"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/ai/summarize",
      "type": "http",
      "method": "POST",
      "description": "Summarize text into 3 key points.",
      "price_usd": "0.002",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "text": "Long text..."
              }
            },
            "output": {
              "type": "json",
              "example": {
                "summary": "..."
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "description": "Text to summarize"
                      }
                    },
                    "required": [
                      "text"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/ai/translate",
      "type": "http",
      "method": "POST",
      "description": "Translate text into any language.",
      "price_usd": "0.003",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "text": "Hello",
                "target_lang": "spanish"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "translation": "Hola"
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "description": "Text"
                      },
                      "target_lang": {
                        "type": "string",
                        "description": "Target language, e.g. spanish"
                      }
                    },
                    "required": [
                      "text"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/ai/code",
      "type": "http",
      "method": "POST",
      "description": "AI code audit with Qwen2.5-Coder.",
      "price_usd": "0.005",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "code": "function f(){}"
              }
            },
            "output": {
              "type": "json",
              "example": {
                "audit": "..."
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Code to review"
                      }
                    },
                    "required": [
                      "code"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    },
    {
      "resource": "https://x402-solver-gateway.alfrexo95.workers.dev/v1/ai/data-analysis",
      "type": "http",
      "method": "POST",
      "description": "Numeric statistics (count, mean, median, min, max) over a JSON array of records.",
      "price_usd": "0.004",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "POST",
              "bodyType": "json",
              "body": {
                "data": [
                  {
                    "x": 1
                  },
                  {
                    "x": 3
                  }
                ]
              }
            },
            "output": {
              "type": "json",
              "example": {
                "dataset_size": 2,
                "statistics": {
                  "x": {
                    "mean": 2
                  }
                }
              }
            }
          },
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "input": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "POST"
                    ]
                  },
                  "bodyType": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "body": {
                    "type": "object",
                    "properties": {
                      "data": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    },
                    "required": [
                      "data"
                    ]
                  }
                },
                "required": [
                  "type",
                  "method",
                  "bodyType",
                  "body"
                ],
                "additionalProperties": false
              },
              "output": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "example": {
                    "type": "object"
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "input"
            ]
          }
        }
      }
    }
  ],
  "discovery": {
    "openapi": "https://x402-solver-gateway.alfrexo95.workers.dev/openapi.json",
    "llms_txt": "https://x402-solver-gateway.alfrexo95.workers.dev/llms.txt",
    "agent_card": "https://x402-solver-gateway.alfrexo95.workers.dev/.well-known/agent-card.json",
    "mcp": "https://x402-solver-gateway.alfrexo95.workers.dev/mcp"
  }
}