true, CURLOPT_RETURNTRANSFER=>true, CURLOPT_TIMEOUT=>15, CURLOPT_HTTPHEADER=>["Content-Type: application/json"], CURLOPT_POSTFIELDS=>json_encode(["service"=>"deepseek","message"=>$msg])]); $r = curl_exec($ch); curl_close($ch); $d = json_decode($r, true); if (!empty($d["content"])) { header("Content-Type: application/json"); echo $r; exit; } } // CRITICAL: Re-inject the raw body so the next script can read it // This is needed because php://input can only be read once $GLOBALS['_wevia_raw_body'] = $_raw_body;