How do I style the API output/result so it looks nice?

When you use the playground, the output is structured nice. Paragraphs have a line break. Bullet points are on new lines. Things look like you’d expect them to, more or less.

However using the API, I’m simply getting one long string. The only formatting is spaces. Even when I tell it to use bullet points on new lines, it ignores that and it’s all just one line.

Obviously it’s quite tedious manually formatting that. Is there a way to clean it up using code so it looks like it does in the playground?

I’m using Next.js and Tailwind CSS but feel free to ignore that and answer however you can, I just need some info to point me in the right direction and I can figure it out.

Thanks!

1 Like

I am going to bump this and follow along, I asked the exact same question yesterday and did not get a response. Hopefully we can find a solution.

1 Like