The 21-year-old Japanese was scheduled to play against Kontaveit on Saturday evening but announced in the afternoon that she would be unable to play.
Osaka said that she had to roll out of bed on Saturday morning after picking up the injury during her quarter-final win over Donna Vekic on Friday.
“I couldn’t lift my upper body. I don’t expect that I will be able to serve,” she said.
“It’s an ab strain, something that I’ve had before. Thankfully, because I’ve had it so many times I am able to tell what it is and I know what to do.”
“I never want to withdraw, especially in a semi-final, so I am sad,” she said.
Osaka said she had broken the news that she was in pain to her team after her dramatic comeback against Croatia’s Vekic on Friday.
“We were in the gym to cool down and they were all happy.” she said.
“I was like er, I have some bad news, and sort of sprung it on them that I was in pain. They were cool about it, so I am grateful to them.”
Osaka, who reached her first semi-final on clay in Stuttgart, said that she might have jinxed herself by talking about injury ahead of the tournament.
“They say you can speak things into existence. I feel like I do that a lot.”
Yet having reached the last four of a WTA tournament for the first time since winning the Australian Open last January, Osaka said she was happy with how things had gone in Stuttgart.
“Even though it is bad that I got injured here, I am happy that it happened at the beginning of the clay season,and not in Rome where it is really close to the French Open.
“I am happy that I won two matches here. This was a really good boost for me, because it let me know that even though I am internalising pain or feelings, I can still win matches.”