How to create Json data

hello. It’s nothing else, in order to link with Chat-GPT with CURL, there is an issue while creating Json data.

curl -i
-H “Authorization: Bearer $OPENAI_API_KEY”
-H “Content-Type: application/json”
-d ‘{
“model”: “gpt-3.5-turbo”,
“messages”: [{“role”: “user”, “content”: “야!”}]

I want to make an http request as above, but I don’t know how to create the data of the message part in the json data.

New With{
key.model = “gpt-35-turbo”,
key.prompt = “hi”,
key.message = JArray(key.)
key.max_tokens = 800,
key.temperature = 0.7,
key.frequency_penalty = 0,
key.presence_penalty = 0

I have currently created Json data as above, but please guide me on what to do to create the message part of the first curl request.


Hi, in curl request you need to provide your OpenAI API key and message is prompt which you send to ChatGPT.

For Ex.

-H “Content-Type: application/json”
-H “Authorization: Bearer Your_API_Key”
-d ‘{
“model”: “text-davinci-003”,
“prompt”: “Say this is a test”,
“max_tokens”: 7,
“temperature”: 0

Thanks for the answer. But what I’m curious about is

“model”: “gpt-3.5-turbo”,
“messages”: [{“role”: “user”, “content”: “Hey!”}]

I wonder how to make this part into Json format!

Hi @pkse76

Please try like so:

(or via hints from the same topic)

Another way would be to have it ready in a text file, and use Read Text File activity to load it to a string variable that you can then pass it in the HTTP Request Body property.

And yet another way, it would be to simply hard-code it as a one line of text in the Body property (you would then escape each double quotation mark with another one), like so:


You need to pass the data in following way,

JObject.FromObject(New With {
key.model = “gpt-3.5-turbo”,
key.messages = New Object() {
New With {
key.role = “user”,
key.content = “Hey”

That was something I was curious about, thanks for the answer!

Your sharing has been very helpful! Thanks for the great help!