string
This is your blog text.
Response
string
This is the generated html for your key takeaways section. It does need some clean up before you can use it on your blog.
curl -X POST \
<BASE_URL>/key-takeaways \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{
"text": "Sample Key Takeaways Text"
}'
$url = '<BASE_URL>/key-takeaways';
$data = array(
'text' => 'Sample Key Takeaways Text'
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY'
));
$response = curl_exec($ch);
curl_close($ch);
import requests
url = '<BASE_URL>/key-takeaways'
headers = {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
}
data = {
'text': 'Sample Key Takeaways Text'
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = '<BASE_URL>/key-takeaways';
const headers = {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
};
const data = {
text: 'Sample Key Takeaways Text'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"key_takeaways": "<some HTML tags>"
}