The AI Bulk Content Generation API can be used to generate content in bulk.
Although we provide a Wordpress Plugin and an interface to create content, some may want to streamline the process with an API.
The AI Bulk Content Generation API requires a token for authorization, and can be accessed with any web aware application, the format of the request is: https://app.fullform.ai/api.php?token=yourtoken&apitype=type& specific data per request
The return value is JSON and will always include the field responsecode with the possible values:
Each API call cost is different in terms of credit and is specified in each call
Keywords and titles are UTF8 encoded
If you need to do a full test of the API, you can contact us at: sales@fullform.ai.
This AI Bulk Content Generation API call will return the credits available until the end of the billing cycle, this call doesn't cost credits.
Parameters:
Example - Get the amount of credit available:
https://app.fullform.ai/api.php?token=yourtoken&apitype=credits
{"responsecode":0,"credits":1000000}
This AI API will start the article generation.
Parameters:
The API will reply with a unique GUID which is required for the second API call.
Example - Generate an article about diabetes:
https://app.fullform.ai/api.php?token=yourtoken&apitype=generatetext&keyword=What%20is%20Diabetes%3F%5Cn&size=1000&auto=1&images=1&topic=1
b256006d-4062-4e0e-9c5e-40ee0578e63a
In case of an error the API can reply with the following errors:
Generating an article can take from 1-30 minutes, that's why you need to poll for the article, the call must be exactly as the previous call, with additional one parameter which is the GUID received in the first call (the parameter name is guid).
The API call will return either the exact same GUID back, which means the article is still being generated, or the article if it's ready.
The function should be called every 30 seconds and shouldn't be called anymore with the GUID after the article was returned.
Example 1 - Calling the API and getting the GUID:
https://app.fullform.ai/api.php?token=yourtoken&apitype=generatetext&keyword=What%20is%20Diabetes%3F%5Cn&size=1000&auto=1&images=1&topic=1&guid=b256006d-4062-4e0e-9c5e-40ee0578e63a
b256006d-4062-4e0e-9c5e-40ee0578e63a
Example 2 - Calling the API and getting the article:
https://app.fullform.ai/api.php?token=yourtoken&apitype=generatetext&keyword=What%20is%20Diabetes%3F%5Cn&size=1000&auto=1&images=1&topic=1&guid=b256006d-4062-4e0e-9c5e-40ee0578e63a
<h1>What is Diabetes</h1>Some text that belongs to the article
In case of an error the API can reply with the following errors:
Work with our API using PHP, to generate AI based articles. This section shows a sample code on how you'd use PHP to acess our API.
A Sample call would look like:
$title = urlencode('What is Diabetes?\n');
$ch = curl_init();
$Request = 'https://app.fullform.ai/api.php?token=yourtoken&apitype=generatetext&size=1000&auto=1&images=1&topic=1&keyword=' . $Title;
curl_setopt($ch, CURLOPT_URL, $Request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$Guid = curl_exec($ch);
$Request .= '&guid=' . $Guid;
while (strlen($Guid) == 40)
{
sleep(30);
$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_URL, $Request);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
$Guid = curl_exec($ch2);
}
if (strlen($Guid) <= 40)
echo 'Received error: ' . $Guid;
else
echo 'The article: ' . $Guid;