At the White House and the K Street headquarters of President Carter's reelection committee, they are saying these days that they finally have Sen. Edward M. Kennedy (D-Mass.) right where they want him -- out front and in the open.

"Now," White House press secretary Jody Powell said recently, "it's not going to be Jimmy Carter compared with God Almighty, but Jimmy Carter compared with the alternatives."

Four weeks before the president's reelection announcement, that is the underlying article of faith for the Carter campaign: that the president's record in office is far more impressive than generally assumed, that the coming campaign will provide the vehicle to get that message across and that in comparison, neither Kennedy nor other challengers will measure up.

Politically, the Carter strategists are planning to wage a bloody war of attrition and are convinced that, after first bursting the myth of Kennedy's invincibility, they can gradually grind him down and defeat him.

This may turn out to be little more than predictable, compaign-eve bravado, a wistful hope destined to be blown away by the power of the Kennedy personality and the magic of the Kennedy name.

But it is also true that in the two months since Kennedy began mounting his campaign challenge, a lethargic White House staff and the Carter campaign organization have snapped to attention and have talked at least themselves into believing that their mission is not impossible.

The Carter strategy is still evolving, but some of the early outlines have been pulled together in a lengthy memorandum, prepared primarily by Richard Moe, Vice President Mondale's chief of staff, and other Mondale aides.

The memo's main thesis is that Carter must turn Kennedy's "leadership" issue against him by challenging him to defend his 17-year record in the Senate and to specify what he would do differently from the president.

Out of this has grown the first lines of attack against Kennedy, as spoken in the last two weeks by Mondale, Powell, the Carter campaign committee's new chairman, Robert S. Strauss, and others.

One of these is what one Carter campaign official calls "the ambition alone" argument, an assertion that the Kennedy candidacy is refueled by nothing more than a raw desire for power, and not some fundamental disagreement with Carter.

"Kennedy does not even claim to disagree with most of the solutions the president has proposed," Powell said. "He says over and over again that he would not do much different. So you have to question going after a president of your own party, not because of a fundamental difference, but because you believe you can take advantage of the difficulties he's experiencing because he's doing what you think is right."

The twin of this argument is that, faced with his first national political test, Kennedy has begun to shift some of his positions toward the more centrist approach of Carter.

"He's found little fault with us over the last three years," one White House official said. "Where differences have arisen, time after time he has moved toward our position on matters such as national defense and national health insurance."

But the White House, in a third line of attack, is not about to let Kennedy's record go forgotten. If inflation is the paramount issue of the 1980 campaign, then "trillion-dollar Teddy," as Powell calls him, will be portrayed as a politician whose time is past.

"He has a record of sponsoring just about anybody's budget amendment," Powell said. "The causes are worthy, and he's built very strong coalition and support on that basis. But clearly he won't want to defend that record in a nationwide test . . . He's got nothing to offer except what he's been, and that's something we both agree is not acceptable today."

The Carter campaign plans to couple these attacks on Kennedy with a strong defense of the president's record. Moe's memorandum lists Carter's major accomplishments under four categories of "leadership" and presidential aides argue that "when you spell it all out, it's damn impressive."

And they will spell it out, according to Powell and others, in paid advertising.

By the time Kennedy formally announced his candidacy last week, the anticipation of the coming contest had given a noticeable lift to the president's aides, who say that if there is one thing they are truly good at it is running and winning political campaigns.

But they are under no illusions about the difficulty of their task. Carter has sunk to historic lows in public approval and, while some polls show him closing the gap, he remains far behind Kennedy as the first choice of Democratic voters.

But the Carter forces say they will enter the contest with certain advantages in addition to the often-mentioned powers of incumbency.

One is the president's ability as a campaigner, which his aides believe is being underestimated.

"For all the talk of him being a dull speaker and a less than inspiring leader, the fact is that in 1975 and 1976 Carter was one of the best campaigners I've ever seen in action," said Tim Kraft, the Carter campaign manager.

Moreover, the White Hnouse is far from distressed that the president is the underdog, for in the sometimes perverse world of modern presidential politics, being the underdog carries with it some advantages.

As the top dog, Kennedy is running not only against Carter but against exceedingly high expectations that have been set for him. The president, in contrast, can survive the loss of some early primaries, because he is expected to lose in New Hampshire and in Kennedy's native Massachusetts.

The White House and the Carter campaign committee anticipate a protracted struggle in which the two candidates trade early primary victories with neither emerging early as superior. In a contest between two such well-known and well-organized candidates, the president's strategists argue, the key will be the slow accumulation of convention delegates, not some magic breakthrough.

The Carter aides contend that they can win such a battle, for another article of faith in the Carter campaign is that the longer such a fight goes on, the stronger will be the president's position and the weaker will be Kennedy's.

One cipher in the Carter planning is the presence of California Gov. Edmund G. (Jerry) Brown Jr., who formally launched his presidential campaign last week. White House aides are quick to say they do not underestimate Brown, who defeated Carter in a string of late 1976 primaries. But it is also clear that they expect Brown to fade quickly.

There are also obvious pitfalls in the Carter strategy. Most of the president's record, which his aides find so impressive, is well-established and does not seem to have helped him. Brown could prove to be more of a factor than expected.

Kennedy could prove overpowering, even in the South. Or, it could be Kennedy who emerges at the end of the long and bloody road with "the magic number of delegates" both candidates seek.

Whatever the outcome, it is clear that the Carter aides are glad that the days of waiting are over.

"Many people here, myself included, did not think Kennedy would run," said a White House official. "He's orchestrated it beautifually, stretched that damn thing out for two months and 'announced' about nine different times. He's had a free ride. But now most people here have adjusted and are eager for the battle. Nobody sees that he has any better answers."