Rescuers now have to decide how best to get the group out in their weakened condition.
Their rescue brought hope in a desperate search that attracted worldwide help and captivated the Southeast Asian country.
Narongsak said earlier the passageway goes upward in some places and downward in others and is very narrow, making it hard for divers and their gear to fit through. "But no one is in red condition".
Staying in place may be the safest option, authorities say.
The cave system is at least four miles long and waters can reach 5 metres (16 feet) during the rainy season, from June through October, Police Col. Kam Saardluan told the AP.
Family members of the missing hugged each other as they cheered the news.
The boys, reportedly aged 11 to 16, and their coach went missing on June 23.
"The doctor advised that we should provide several kind of medicine to prevent infection and other illness", Osatanakorn said, adding that medics had reached the young footballers.
The boys can be seen perching on a slope inside the cave, dressed in shorts and t-shirts.
Ronaldo tight-lipped on future after World Cup KO
With that, dreams of a quarter-final between the two greatest players were shattered. "He is an exceptional player", said Uruguay's veteran coach Oscar Tabarez .
Trump attacks Democrats, defends ICE in Saturday morning tweets
Charles Schumer, D-N.Y., during Congress unsuccessful effort to pass comprehensive immigration reform in 2013-2014. Trump's defence of ICE was posted after some critics of the administration said the agency should be shut down.
Gareth Southgate makes tournament strategy revelation ahead of England vs Colombia
The organization has surprised everyone, I think it's given an incredible image of the Russian people, of Russia in general. Even if the strategy backfires, it is hard not to admire Southgate for the singlemindedness he continues to display.
A doctor will spend the night with the group and determine when they're strong enough to be taken out.
Still, rescuers believe the boys have a chance of surviving, and could have access to fresh water inside the cave, and medical teams were practicing drills to treat survivors, and airlift them from a make-shift helipad.
Narongsak said on Tuesday that the missing were given high-protein liquid food, painkillers and antibiotics. At the end of the video, a boy asked in English, "Where do you come from?"
Everything depends on how hard the dives are. Mirza said that "trying to take non-divers through cave is one of the most unsafe situations possible, even if the dives are relatively easy". He said rescuers must still decide whether to try to get the team out of the cave or to instead provide them with survival supplies until water levels go down.
In the video, posted on the Thai Navy SEAL Facebook page, one of the boys shouts to the rescuers: "we are hungry. shall we go outside?"
"We called this "mission impossible" because it rained every day ... but with our determination and equipment we fought nature", Narongsak said.
Thai Prime Minister Prayuth Chan-ocha thanked the worldwide teams and rescuers who helped find the group. Many, many people. We're the first.
The rescuers had been stymied repeatedly by rising water that forced divers to withdraw for safety reasons.
Rescuers had been working on Monday to clear a constricted passageway for divers deep inside the flooded cave complex in a search operation that has been hampered by heavy rain. Several fissures have been found and teams have explored some, although so far, none lead to the trapped boys.