Doesnt work language and overlayRequired

i have this call on PHP

function uploadToApi($target_file){
    require __DIR__ . '/vendor/autoload.php';
    $fileData = fopen($target_file, 'r');
    $client = new \GuzzleHttp\Client();
    try {
    $r = $client->request('POST', 'https://api.ocr.space/parse/image',[
        'headers' => ['apiKey' => '18db9b6d4588957'],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => $fileData
            ]
            ],
        'language' => 'esp',
        'isOverlayRequired' => true,
    ]);
    $response =  json_decode($r->getBody(),true);
    if($response['ErrorMessage'] == "") {

and it works, gives me the json but without the isOverlayRequired cause theres no x and y position for every line etc

and if isOverlay required dont work i think the language isnt working either

Hi, does it work in Postman for you? If yes, use Postman’s code generation feature to generate working PHP code.

ChatGPT also knows our OCR API well, and can generate (usually) working code for it.