Array
(
    [model_id] => 95
    [model_name] => SharpAPI Summarize Text
    [language] => php
    [code] => <?php

$api_key = "{{api_key}}";
$content = "{{content}}";  
$language = "{{languages}}";  // Spanish, English, Hindi
$max_length= "{{max_length}}"; //100,200,300,etc. character length

$url = "https://sharpapi.com/api/v1/content/summarize";

$data = [
    "content" => $content,
    "language" => $language,
    "max_length" => $max_length,
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => [
        "Authorization: Bearer ". $api_key,
        "Content-Type: application/json",
        "Accept: application/json"
    ],
    CURLOPT_POSTFIELDS     => json_encode($data)
]);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    die("cURL Error: " . curl_error($ch));
}

$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);

$result = json_decode($response, true);

echo "<pre>";
print_r($result);
echo "</pre>";

?>
    [get_code] => <?php

$api_key = "{{api_key}}";
$job_id = "{{job_id}}";

$statusUrl = "https://sharpapi.com/api/v1/job/status/".$job_id;

$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => $statusUrl,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPGET => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer ". $api_key ,
        "Accept: application/json"
    ],
    CURLOPT_TIMEOUT => 120
]);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    die("cURL Error: " . curl_error($ch));
}

$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);

echo "HTTP Code: " . $httpCode. "<br><br>";

echo "<pre>";
print_r(json_decode($response));
echo "</pre>";

?>
)