Web app output much better than API

Hi, the same prompts in the web app work very differently in the API. The API does not organise answers as eloquently as the web app, given the same prompt and same context. How can i resolve this?