Hi there!
You can’t restrict the API per se. In general though, there should be no problem with achieving the desired output via prompt engineering. The model should normally not produce code unless you ask it to or your prompt is ambigious in this regard.
Did you face any challenges with a particular prompt you were testing out or what caused the concern?