java.io.IOException: Server returned HTTP response code: 400

Thank you for your time , I have included the validate_api_key part code , but it is still showing the same error. However the below code works perfectly, I think the issue is with image part , Since the length of base64image is 354848 , so can it be token exceed issue (though it does not show any error like that) ?
String jsonInputString2 = “{\n” +
" "model": "gpt-4-vision-preview",\n" +
" "messages": [\n" +
" {\n" +
" "role": "system",\n" +
" "content": "You are a helpful assistant."\n" +
" },\n" +
" {\n" +
" "role": "user",\n" +
" "content": "“+command+”"\n" +
" }\n" +
" ]\n" +
“}”;