The United States said yesterday that any attempt by third parties to mediate in the current hostage situation would have to be based on America's insistence that a solution begin with the unconditional release of the 40 Americans held in Beirut.

Reacting to a flurry of mediation offers from other governments, State Department spokesman Bernard Kalb said any help "must fall within the context of the fixed American position" of refusing to make any "deals" or "concessions" with those holding the hostages.

His statement seemed to place extremely tight limits on the maneuvering room that the United States is presently willing to grant any third party seeking to help arrange the hostages' release.

The original Shiite hijackers and now the members of Amal, who hold most of the Americans, say they will not free the hostages until Israel frees more than 700 Lebanese prisoners, mostly Shiites. They have called on Washington to influence Israeli leaders to get them to accept a swap.

At least four countries -- Algeria, Austria, Switzerland and Sweden -- are known either to be in contact with Amal concerning the hostages or to have offered their services. So far, none has succeeded in persuading Amal leader Nabih Berri to free the remaining 40 TWA passengers, although Algerian mediators earlier persuaded the original hijackers to free almost 80 hostages in Algiers.

In addition, the United States has contacted Middle East governments, including Syria and Saudi Arabia, asking for help in winning the release of the Americans. Syria, if willing, could play a crucial role because of its special ties to Berri's Amal and its standing as the dominant foreign power in Lebanon.

Relations between Syria and the United States are extremely cool, however, and President Hafez Assad recently disclosed that he had been unable to persuade Shiite radicals holding seven other Americans hostage to release them. Thus, it is uncertain that he is willing or able to do anything.

Two third-country intermediaries with considerable past experience in negotiations over hostages or prisoner swaps -- Algeria and Austria -- are deeply involved, at their own initiative, in diplomatic maneuvers to help the United States. The two countries are particularly well-situated to play a role because of their special diplomatic assets on the ground in Beirut.

Switzerland has also offered "its good offices" and to play the role of mediator. It has sent Berri a message asking him to release the hostages on "humanitarian grounds." But that officially neutral nation has less direct experience in Middle East negotiations.

The present Algerian ambassador to Lebanon, Abdelkrim Kraieb, served as his country's top diplomat in Tehran from 1979 to 1982 and carried out the protracted but ultimately successful negotiations with Iranian authorities over the release of 52 Americans held hostage in the U.S. Embassy there.

"He seems predestined for these things," said Mohamed Sahnoun, the Algerian ambassador here. "He has considerable expertise."

Kraieb, who broke off a vacation in Paris to return to Beirut, has been in repeated contact with Berri over the American hostages but yesterday returned to Algiers for consultations with his government.

Austria also has a highly experienced ambassador in Beirut, Georg Cnidaric. He was briefly taken hostage by Shiite radicals two weeks ago when he attempted to inspect one of the Palestinian refugee camps in south Beirut, which the Shiites were besieging.

An Austrian embassy spokesman said his government had gotten involved in the hostage crisis "at its own initiative" early this week. Yesterday, Cnidaric told The Washington Post in Beirut that he had been instructed by his government to contact Berri and tell him that Austria stood ready "to do whatever we can in negotiating, serving as a go-between or providing a place for the transfer of the prisoners."

Austria's former chancellor, Bruno Kreisky, has arranged prisoner exchanges between Israel and Palestinian guerrillas, the latest last month when 1,150 Palestinians were swaped for three Israeli soldiers. Austria's ambassador in Athens, Herbert Amry, was also involved in that exchange, which partly took place at the Geneva airport under the auspices of the Swiss-run International Committee of the Red Cross. ICRC President Alexandre Hay said after a meeting with President Reagan Thursday that his organization is "standing ready" to help again but only if "all sides ask us to do something." Hay said this had not happened.