Khamenei spoke in a video broadcast on Iranian state television on Thursday, his first appearance since June 19, looking and sounding more tired than he did only a week ago.
He told viewers the US had only intervened in the war because "it felt that if it did not intervene, the Zionist regime would be utterly destroyed".
But he said, however, the US "achieved no gains from this war".
"The Islamic Republic was victorious and, in retaliation, delivered a hand slap to America's face," he said, in apparent reference to an Iranian missile attack on an American base in Qatar on Monday, which caused no casualties.
The 86-year-old Khamenei has not been seen in public since taking shelter in a secret location after the outbreak of the war June 13 when Israel attacked Iranian nuclear facilities and targeted top military commanders and scientists.
Following an American attack on June 22 that hit the nuclear sites with bunker-buster bombs, US President Donald Trump was able to help negotiate a ceasefire that came into effect on Tuesday.
In his appearance on Thursday, he sat in front of plain brown curtains to give his address, similar to his June 19 message.