President Carter said today he favors extending federal short-term loans to New York City for several years beyond the June 30, 1978, expiration date for the program, but that does not apply to the city's current request for $255 Million from the Treasury to tide it over the next few weeks.

New York City faces bankruptcy again next week as a result of an impasse that has developed over how to raise $1 billion to repay its moratorium debt.

Talks with the city's banks and unions collapsed on Monday, but informal meetings continued today in an effort to find a way around the negotiating impasse, as the deadline for finding a solution draws closer.

President Carter made his remarks on New York City to an audience of Defense Department civil servants where the question of the city's precarious financial condition came up.

Initial accounts seemed to indicate that the President backed the city's by overruling a tough stand taken by Treasury Secretary W. Michael Blumenthal that the city would have to resolve its moratorium problems first. And the White House later issued a clarifying statement saying that "the President was not referring to the current city loan request."

In his Pentagon remarks, President Carter said the federal government's current role in helping New York City involved short-term loans to allow the city to smooth out seasonal gaps between revenues coming in and expenditures going out, and "to tide them over for a few months at a time."

He said he favored continuing the existing short-term program for New York City "and of increasing it up to five or six years," but also said it was up to "the city, the state, the banks and the labor unions . . . To deal with the long-range financial problems without federal participation."

"I believe the crisis can be weathered," the President said, adding that "the federal government's role will be minor but ought to be extended."

Under the loan program now in place, the city can borrow up to $2.3 billion from the federal government each fiscal year to meet its seasonal financing needs. But the loans must be repaid each year in full. And the enabling legislation expires on June 30, 1978, when the city is expected to have a balanced budget and no more deficit.

President Carter's position today was that the federal government should keep extending loans for these seasonal needs for two or three years more, thus reducing the amount that New York City must borrow on its own once it reenters the financial markets.

During his campaign President Carter pledged a number of times not to let New York City go bankrupt. Subsequent to his election, Carter met with the New York City Mayor Abraham Beame and New York Gov. Hugh L. Carey at Sea Island, Ga., and statements made afterwards indicated that this pledge applied to what happened after June 30, 1978.

At that meeting Beame and Carey reportedly told the President that the city would solve the $1 billion moratorium problem without recourse to new federal assistance.

"The fact is we still are confident that this can be resolved within the agreements of the local parties," a spokesman for Mayor Beame said today. "It is within that understanding that the President is operating. The mayor and the governor both made statements that they had no desire to drag the federal government in on this. I wouldn't speculate what happens if all of this falls apart. But I think the administration is dealing in good faith with what the Sea Island understanding was."

The mayor's spokesman also said that "some brinksmanship is being played by the banks, the unions and the federal government" in trying to drive home an agreement and he expressed concern that "the participants don't end up painting themselves into a corner."

No new negotiating meeting is scheduled before Friday, although Mayor Beame has asked the banks to come up with their response to his proposal for an outside mechanism to monitor the city's finances - something the banks are demanding - by Wednesday. The unions, for their part, are resisting any outside intrusion, which is the main reason for the negotiating logjam.

The city will start slowing down its bill payments to vendors next Monday, and if it doesn't come up with any new money, faces bankruptcy by March 11 when it must meet a major payroll.