true, CURLOPT_POSTFIELDS => json_encode(['contents' => [['parts' => [['text' => 'hello']]]]]), CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_RETURNTRANSFER => true, ]); $res = curl_exec($ch); echo "Response: $res\n";