string
This is your blog title.
string
This is your focus keyword.
array
These are the blog sections.
string
This is the section that you want to focus on.
object
These are the previous sections of your blog.
string
Any guildlines to consider while generating the blog body. Example: No political posts
Response
string
This is the generated paragraph.
curl -X POST \
<BASE_URL>/v2/body \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{
"title": "The Future of Technology",
"keyword": "Innovation",
"sections": [ "Introduction", "AI Advancements", "Impact on Society" ],
"focus_section": "Impact on Society",
"previous_sections": {
"Introduction": "This is the introduction section",
"AI Advancements": "This is the AI advancements section"
},
"guidelines": "No political content"
}'
$url = '<BASE_URL>/v2/body';
$data = array(
'title' => 'The Future of Technology',
'keyword' => 'Innovation',
'sections' => array('Introduction','AI Advancements', 'Impact on Society'),
'focus_section' => 'Impact on Society',
'previous_sections' => array(
'Introduction' => 'This is the introduction section',
'AI Advancements' => 'This is the AI advancements section'
),
"guidelines" => "No political content"
);
$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>/v2/body'
headers = {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
}
data = {
'title': 'The Future of Technology',
'keyword': 'Innovation',
'sections': [ 'Introduction', 'AI Advancements', 'Impact on Society' ],
'focus_section': 'Impact on Society',
'previous_sections': {
'Introduction': 'This is the introduction section',
'AI Advancements': 'This is the AI advancements section'
},
"guidelines": "No political content"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const url = '<BASE_URL>/v2/body';
const headers = {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
};
const data = {
title: 'The Future of Technology',
keyword: 'Innovation',
sections: [ 'Introduction', 'AI Advancements', 'Impact on Society' ],
focus_section: 'Impact on Society',
previous_sections: {
Introduction: 'This is the introduction section',
'AI Advancements': 'This is the AI advancements section'
},
"guidelines": "No political content"
};
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));
{
"body": [
"The generated body."
]
}