The United States would be happy to consider negotiating a free-trade agreement with Japan along the lines of the treaty reached with Canada, Treasury Secretary James A. Baker III said Friday. While there are no current discussion about such a treaty, it would fit into this country's overall strategy to break down trade barriers wherever they exist, he said. ``We have a major trading relationship with Japan,'' Baker said. ``It (a free trade agreement) would be something that the United States would be pleased to consider if it were something that the government of Japan wanted to consider.'' Baker's comments came in a television interview with foreign journalists for broadcast outside the United States by the U.S. Information Agency. The session was a preview of the seven-nation economic summit opening Sunday in Toronto. President Reagan, addressing the annual conference of the USIA International Council, meantime, reiterated his belief in free trade while saying trade barriers of other countries are generating protectionist pressures in America. ``It damages the entire world economy when foreign countries fail to offer the same opportunity to American exports that America offers to their products,'' Reagan said. ``It is this basic sense of fairness that has helped generate protectionist pressures in America. Let me repeat protectionism, the closing of America's markets, is the wrong response; opening markets, that, I firmly believe, is the answer.'' Meanwhile, there appeared to be movement on another contentious trade dispute between Japan and the United States. U.S. Trade Representative Clayton Yeutter announced Friday that he was leaving immediately for Japan, saying a deal may be near on ending that nation's restrictions on beef imports. ``We certainly have not yet reached an agreement, but I'm persuaded that the news is sufficiently encouraging to justify a trip,'' Yeutter said. White House spokesman Marlin Fitzwater said, ``We remain hopeful,'' but added, ``Until there's a deal, there's no deal.'' The Agriculture Department has placed the overall value of the Japanese beef market at $2 billion. A U.S.-Japan free-trade agreement would presumably be of substantial benefit to this country because U.S. officials for years have pressured the Japanese to open their markets to American products as a way of reducing the huge trade imbalance between the two nations. The Japanese ran up a trade surplus with the United States last year of $59.8 billion, more than one-third of this country's America's overall trade deficit of $170.3 billion. The U.S.-Canada pact now being considered by Congress and the Canadian Parliament would end all trade barriers within 10 years. Some critics have charged that specific trade pacts such as the U.S.-Canada agreement or the plan to eliminate all barriers between the 12-nation European Economic Community by 1992 pose risks of returning the world to the trade cartels of the 1930s, which worked to shrink trade rather than expanding it. But Baker disputed this, saying the United States saw any trade liberalization agreements as beneficial. He said America preferred to pursue reduction of trade barriers through the discussions being held under the auspices of the 96-nation General Agreement on Tariffs and Trade. But he hinted that if those talks did not reach a successful conclusion, the United States would look to trade pacts with smaller groups of countries. Baker said the summit between President Reagan and other Western leaders would include a full-fledged discussion of Reagan's proposal to eliminate all farm subsidies by the year 2000. These subsidies are costing the major industrial countries $150 billion annually in higher government support payments and increased food costs to consumers. He acknowledged that the U.S. proposal to eliminate subsidies was facing intense opposition, with Washington hoping basically for a reiteration in Toronto of a pledge the industrialized nations made last month in Paris to press forward in negotiations on the issue. The U.S. delegation, led by Baker, had pressed for more specific language to adopt Reagan's call for a subsidy-free world in agricultural trade by a specific date. But Baker contended Friday that progress had been made in Paris. ``The fact that we are even discussing this very difficult problem of agricultural subsidies represents progress,'' he said. ``It is not going to be at all easy to move toward eliminating subsidies or reducing subsidies for any of us unless we are all able to go to our farmers and say the world is going to do this.'' European nations have argued that it is politically impossible to eliminate all farm subsidies and a proper compromise would be to reduce them, perhaps by cutting them in half. The United States is hoping to keep the pressure on so that hard bargaining to end protectionism in agriculture can take place at a Montreal trade meeting in December. The Montreal meeting will be a midterm review for the current round of global trade talks which were launched in 1986 in Uruguay and scheduled to end in 1990.