THE IRANIANS want an international airing of their charges against the shah and the United States. The Americans want their hostages released -- all of them and now. So far the ayatollah has rejected this condition, demanding that the shah be returned to Tehran. The administration has responded by tightening the pressure. But the ayatollah may be bending. Such, at any rate, is the evident hope of United Nations Secretary General Kurt Waldheim, who is trying to make a deal: for the United States, freedom for the hostages; for Iran, the satisfaction of knowing that its complaints against the shah and the United States will be heard.

Putting together this deal will be tough. The ayatollah, it seems, kidnapped the embassy not simply out of rage but out of calculation: to muster the passion needed to insure the people's ratification of the new charter by which he means to reconstitute Iran as a pure Islamic state. The passion he has mobilized for that referendum, scheduled to take place next week, works against the concessions being asked by Mr. Waldheim.Furthermore, the specific terms of any agreement are highly arguable: who is to "judge" the shah, with what evidence and with what authority -- and with what implications for other autocratic governments everywhere.

The United States is likely to come in for heavy abuse at any tribunal organized at the ayatollah's insistence, especially one organized at or through the United Nations, a body that Americans have come to view chiefly as a Third World propaganda forum. But the United States will have the opportunity to answer charges if it chooses and, anyway, full Third World support for the ayatollah is far from assured. Iran has every right to use the procedures of thebodies to which it belongs to claim a hearing; the United States has the same right, including the right to ignore the proceedings. It is certainly preferable to have the ayatollah pressing his grievances verbally through official channels than practicing state terrorism against diplomatic hostages. That is not what you would call a ringing endorsement of the idea, we know. The point is that, as of now, nobody seems to have a better idea.