Difference between AI "chat" and API

Hi,

It seems to me that the output I get using an AI model “chat” (meaning using it manually online) are always much better than the output I get using the API through Make, even though I’m using the exact same prompt and the best models available.

Case on hand : I’m trying to edit and rewrite html files (email) with Grok.

When I ask Grok3 to do that in the chat, the results are amazing.

When I try using the API with the Grok3-beta model, the html I get is all broken and incomplete.

It’s the same with Deepseek (i haven’t compared the others).

Have anyone noticed that ? And found a solution ?

Thank you very much