The WordAi API is designed to be extremely simple and easy to understand. All you have to do is make an HTTP request with POST variables. Our example below is a PHP example that uses cURL (which can usually be copied/pasted into a PHP script and will work out of the box), but you can use whatever programming language you want. Sample code in other languages is coming soon!
function api($text,$quality,$email,$pass)
{
if(isset($text) && isset($quality) && isset($email) && isset($pass))
{
$text = urlencode($text);
$ch = curl_init('http://wordai.com/users/turing-api.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "s=$text&quality=$quality&email=$email&pass=$pass&output=json");
$result = curl_exec($ch);
curl_close ($ch);
return $result;
}
else
{
return 'Error: Not All Variables Set!';
}
}
//The variable quality can currently be 'Regular', 'Readable', or 'Very Readable'
echo api(stripslashes('Here is an example.'),'Regular','email','password');
{
"uniqueness":100,
"text":"{Here is|Here's} {an example|a good example|an illustration}.\n",
"status":"Success"
}
{
"error":"Error: You cannot process articles longer than 2,000 words with the Turing API",
"status":"Failure"
}
Our API is designe to be very simple. All you have to do is make a POST request (see the example code) and you will receive your spintax back!
We have two options. The first option is to receive a json return. The second one is a plaintext return (all you get back is spintax). See our "example" return for an example!
We have a large amount of API options that you can see below. If you there is something you'd like added, let us know!
s (Required) - The text that you would like WordAi to spin.
quality (Required) - 'Regular', 'Readable', or 'Very Readable' depending on how readable vs unique you want your spin to be
email (Required) - Your login email. Used to authenticate.
pass - Your password. You must either use this OR hash (see below)
hash - md5(substr(md5("pass"),0,15)); is the algorithm to calculate your hash. It is a more secure way to send your password if you don't want to use your password.
output - Set to "json" if you want json output. Otherwise do not set and you will get plaintext.
nonested - Set to "on" to turn off nested spinning (will help readability but hurt uniqueness).
sentence - Set to "on" if you want paragraph editing, where WordAi will add, remove, or switch around the order of sentences in a paragraph (recommended!)
paragraph - Set to "on" if you want WordAi to do paragraph spinning - perfect for if you plan on using the same spintax many times
title - Set to "on" if you want WordAi to automatically spin your title if there is one or add one if there isn't one
returnspin - Set to "true" if you want to just receive a spun version of the article you provided. Otherwise it will return spintax.
nooriginal - Set to "on" if you do not want to include the original word in spintax (if synonyms are found). This is the same thing as creating a "Super Unique" spin.
protected - Comma separated protected words (do not put spaces inbetween the words)
*Note: The number of protected words passed as parameter combined with the number saved in the account setting should not exceed 10,000. If it is more than 10,000, we will only take first 10,000 entries.
synonyms - Add your own synonyms (Syntax: word1|synonym1,word two|first synonym 2|2nd syn). (comma separate the synonym sets and | separate the individuals synonyms)
*Note: The number of custom synonyms groups passed as parameter combined with the number saved in the account setting should not exceed 10,000. If it is more than 10,000, we will only take first 10,000 entries.
perfect_tense - Perfect Tense automatically fixes any grammar errors. Set to "correct" if you want WordAi to correct your text with Perfect Tense and then spin it. Set to "synonym" if you want WordAi to spin your text and then add corrections as synonyms. You need Perfect Tense API to use this feature. If you do not have Perfect Tense API then sign up here.
*Note: We recommend using "correct" if you don't plan on making any edits to your spintax or if you plan on using your spintax many times. Use "synonym" if you plan on editing your spintax.