NEW YORK. — New York -- Ed Koch tells this story about a trip to Tokyo while he was mayor -- Tokyo was twinned to New York. When he arrived, the mayor of Tokyo said, ''Mayor Koch. The first thing I want to do is to commiserate with you on the terrible amount of crime you have to deal with in subways of your city.''
''Thank you Mr. Mayor,'' Mr. Koch replied, somewhat taken aback, ''but at least I don't have to reciprocate. I know you have no such problem with the Tokyo subway. I've never read or seen anything about it.''
''Oh no, Mayor Koch,'' returned the Japanese, ''Quite the contrary: Subway crime is one of our very worst problems.''
Mr. Koch's point was that New York is probably the most read-about, filmed-over and generally promoted city in the world, and that anything that happens, here, especially the bad things, gets maximum publicity. Few editors would print an item about a murder in the subway in Tokyo because it would be too uncharacteristic. But in New York it is meat for the sausage casing, and so when it happens, the story writes itself.
Promoted and glamorized by endless television serials, especially crime serials like ''Kojak,'' New York has become over the years a tremendously magnetic place. Views of the Brooklyn Bridge or of the Statute of Liberty or the Chrysler Building, however hackneyed, are, to outside eyes, America's most direct and compelling images.
Films likewise are produced by the mile in New York, and this includes many of the police sagas: ''Fort Apache'' made the South Bronx famous forevermore. But there are also the Spike Lee movies which mirror Bedford-Stuyvesant and Bensonhurst and other black districts of New York. There are the idylls of Fred Astaire which mirrored the Manhattan of the 1930s, as those of Woody Allen mirror that of the 1960s and 1970s. And was it not King Kong who immortalized the Empire State Building?
When a labor dispute interrupted shooting in New York recently, the directors moved the sets to Toronto, at least for ''generic'' scenes and interiors, But even so the lack of landmarks or even distinguishing surroundings soon caused Toronto to ''dry-up,'' and the sets awaited their return to New York.
For the thousands of cameramen, directors and newspaper writers assigned to New York, and for their audiences, these images are the reality of the city. The foreign readers and viewers of their productions, need not be told what the Battery is or how to find the Bronx. The folklore becomes all-devouring, with the result that nothing that happens, say a grease-gun massacre on the Lexington avenue subway, is outside its reach -- or its appetite.
For the legend consumers in the United States itself, digesting is more difficult, although something of the same spirit prevails. The East Village, with its decaying brownstones, its addictions, its sexual incoherence and its moral and cultural anarchism, are to American youth of today what Greenwich Village and its equivalent attraction were to the American youth of ages past.
Or rather, the movie version of it, for many people in the East Village or elsewhere in New York have the sensation they are living a film anyway. This trance-like feeling, deadening certain perceptions but heightening others, is what allows people to describe some daily act of gross brutality, for example stuffing automobile trunks with fresh corpses, as being ''just like the movies.''
Crime and brutality are only a part of New York's reputation (and one can find worse elsewhere). In the same way one can find hordes of serious, dedicated young people starting their careers here in circumstances that would satisfy Norman Rockwell.
Nevertheless legends polarize around what is ''colorful.'' So it comes as natural that a new episode of the popular television serial ''Murder, She Wrote'' which brings Angela Lansbury to New York, should begin with the murder of the man whose luxury apartment she has just taken over.
The script emphasizes, perhaps gratuitously, that this is ''secure'' apartment house with an incorruptible doorman in a ''safe'' neighborhood.
The case turns around a diamond smuggler who has killed the victim for the sake of greed. Angela, doping out the details of the crime in her anxious way, works closely with a veteran police lieutenant of the homicide squad. The lieutenant, jovial and nearing retirement, turns out to be, that's right, the murderer himself.
The inescapable inference, writ large, is that such a thing could happen, in fact had to happen, in New York.
Nicholas King is a New York writer.