# Error parse JSON body your request

**URL:** <https://community.openai.com/t/error-parse-json-body-your-request/633066>\
**Category:** API\
**Created:** [February 17, 2024, 11:41am UTC](https://community.openai.com/t/error-parse-json-body-your-request/633066 "2024-02-17T11:41:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![helviodarochalima](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/helviodarochalima/32/48056_2.png) [@helviodarochalima](https://community.openai.com/u/helviodarochalima)\
**Post date:** [February 17, 2024, 11:41am UTC](https://community.openai.com/t/error-parse-json-body-your-request/633066/1 "2024-02-17T11:41:34Z")

</div>

good morning everybody. I’m having an error when I use the api with the gpt-4 model. I pass the prompt and context parameters, it turns out that when I send the conversation history in the context parameter, I receive a JSON error (attachment). I have already cleaned the text of special characters, transformed the text into UTF-8, but the error persists. The strangest thing is that when I run the api with simple texts it doesn’t give an error. my application is in flutter, the input is a string, the variables used are in string. Would anyone have any suggestions to resolve this problem? Thank you in advance. Helvio

 ![IMG_4742](https://us1.discourse-cdn.com/openai1/original/4X/2/7/b/27b4ef1d1d2d85d03c030e54e6c3283b303abfd5.jpeg)

---

<div class="post-metadata">

**Author:** ![mark.storer](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/mark.storer/32/386809_2.png) [@mark.storer](https://community.openai.com/u/mark.storer)\
**Post date:** [May 21, 2024, 3:46pm UTC](https://community.openai.com/t/error-parse-json-body-your-request/633066/2 "2024-05-21T15:46:00Z")

</div>

I am also intermittently receiving this error using gpt-4o. If I go back to gpt-3.5-turbo, I can send these requests all day long. I try using the same JSON payload through Postman and things work fine. Anyone else having intermittent issues with JSON parsing? It seems to be the longer prompts 1000-2000 characters or more complex formatting in the text.

Here is a payload that failed:  
{“messages”:[{“role”:“system”,“content”:“You are a cheerful and accommodating tour guide to provide Entertainment and Engagement. Do not use emojis or markdown.”},{“role”:“user”,“content”:“Previous statement: Good morning, Mark! I’m Amy, the Adventurer. Are you ready for an adventure today? What type of adventure interests you? Here are a few options to consider:\n\n1. A historical city walking tour.\n2. A nature hike through scenic trails.\n3. Exploring a local museum with unique exhibits.\n\nWhich one excites you the most? Let\u0027s embark on an unforgettable journey together!”},{“role”:“user”,“content”:"Considering your previous statement and the response of 3, describe in 10 words or less the adventure they chose. "}],“model”:“gpt-4o”,“max\_tokens”:1000,“frequency\_penalty”:1,“presence\_penalty”:1,“response\_format”:{“type”:“text”},“temperature”:1}
