[ ["role" => "system", "content" => "You are a helpful assistant."], ["role" => "user", "content" => "Hello, give me an example reply."] ], "seed" => 101 ]; $options = [ 'http' => [ 'header' => "Content-Type: application/json\r\n", 'method' => 'POST', 'content' => json_encode($data), ] ]; $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if ($result === FALSE) { echo "An error occurred!"; } else { header('Content-Type: application/json'); echo $result; } ?>