# Formatting API responses... (theory)

**URL:** <https://community.openai.com/t/formatting-api-responses-theory/114412>\
**Category:** API\
**Created:** [March 23, 2023, 1:08am UTC](https://community.openai.com/t/formatting-api-responses-theory/114412 "2023-03-23T01:08:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve0k](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/steve0k/32/33618_2.png) [@steve0k](https://community.openai.com/u/steve0k)\
**Post date:** [March 23, 2023, 1:08am UTC](https://community.openai.com/t/formatting-api-responses-theory/114412/1 "2023-03-23T01:08:37Z")

</div>

Hi everyone,

I have a question that is a bit more theoretical at this point in time (for me at least). I am really cooking with gas now when it comes to my tool I created, works great. Things are going smooth. I am wondering though, when it comes to posting the OpenAI API response to an output, has anyone played around with formatting it to bold/italic/underline, etc…

I have already implemented my tool to add line breaks accordingly when it posts to the output… for example, when the paragraph it returns is large, or there is a numbered list, etc… the API has built in line breaks like that.

Although when I have been playing around with it, I do not believe 3.5-turbo sends back a response with any type of underlying formatting recommendations when posting the response. I was thinking of building it into my prompt logic (sorry… “messages” logic… lol), so that the model will respond with what it possibly thinks could be bolded, or underlined, etc… but if it follows those directions so that my javascript de-codes it to post it to the output properly… that is what I am wondering. For example:

* * *

Using the following conventions to format your response, answer the following question:

- For bold text, use _asterisks_ around the text
- For italic text, use _underscores_ around the text
- For underlined text, use +plus signs+ around the text

* * *

Has anyone been successful in this?

If so let me know, I don’t want to spend the time on this if someone has tried and failed already. If it has worked for someone, then yes I will give it a go, and if successful I can post how I did it for future reference to help someone.

Thanks!

---

<div class="post-metadata">

**Author:** ![raymonddavey](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/raymonddavey/32/14125_2.png) [@raymonddavey](https://community.openai.com/u/raymonddavey)\
**Post date:** [March 23, 2023, 1:27am UTC](https://community.openai.com/t/formatting-api-responses-theory/114412/2 "2023-03-23T01:27:28Z")

</div>

You need to ask the API to write using “markdown format”.

There are libraries available to convert markdown to HTML and back again
