"UI Results Differ from API Results for GPT-4o"

I was trying to extract the information from the image.When am doing in the Playground UI am getting accurate results without spelling mistakes.But the same am trying with the API API , am facing spelling mistakes.This is my code.Please need help for this.

import openai
import base64
import csv
import re
import json
# Set up your OpenAI API key
openai.api_key = 'sk-**************'

# Path to the image file
image_path = '/path_of_the_image.png'

# Function to read image and convert to base64
def image_to_base64(image_path):
    with open(image_path, "rb") as image_file:
        encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
    return encoded_string

# Path to the image

# Convert image to base64
image_base64 = image_to_base64(image_path)

# Define the prompt
prompt = """PCN,Patient ID,Patient Full Name,Claim ID,Paid Amount,Extract the data of all the rows from the image and map with the above columns in json format.
  "PCN": "", 
  "Patient ID": "0000000", 
  "Patient Full Name": "xyz", 
  "Claim ID": "12345678", 
  "Paid Amount": "0.00", 

# Make the API call
response = openai.ChatCompletion.create(
        {"role": "system", "content": "Act as a Data Entry Agent and extract the data from the image."},
        {"role": "user", "content": prompt},
        {"role": "user", "content": [{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{image_base64}"}}]}

# Print the response
json_data = response['choices'][0]['message']['content']
# print(response['choices'][0]['message']['content'])