curl --request POST \
--url https://api.gowinston.ai/v2/ai-content-detection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"file": "<string>",
"website": "<string>",
"version": "<string>",
"sentences": true,
"language": "auto"
}
'import requests
url = "https://api.gowinston.ai/v2/ai-content-detection"
payload = {
"text": "<string>",
"file": "<string>",
"website": "<string>",
"version": "<string>",
"sentences": True,
"language": "auto"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
file: '<string>',
website: '<string>',
version: '<string>',
sentences: true,
language: 'auto'
})
};
fetch('https://api.gowinston.ai/v2/ai-content-detection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gowinston.ai/v2/ai-content-detection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'file' => '<string>',
'website' => '<string>',
'version' => '<string>',
'sentences' => true,
'language' => 'auto'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gowinston.ai/v2/ai-content-detection"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"file\": \"<string>\",\n \"website\": \"<string>\",\n \"version\": \"<string>\",\n \"sentences\": true,\n \"language\": \"auto\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gowinston.ai/v2/ai-content-detection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"file\": \"<string>\",\n \"website\": \"<string>\",\n \"version\": \"<string>\",\n \"sentences\": true,\n \"language\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gowinston.ai/v2/ai-content-detection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"file\": \"<string>\",\n \"website\": \"<string>\",\n \"version\": \"<string>\",\n \"sentences\": true,\n \"language\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"score": 123,
"sentences": {
"text": "<string>",
"score": 123
},
"input": "<string>",
"attack_detected": {
"zero_width_space": true,
"homoglyph_attack": true
},
"readability_score": 123,
"credits_used": 123,
"credits_remaining": 123,
"version": "<string>",
"language": "<string>"
}{
"error": "BAD_REQUEST",
"description": "The request was invalid and could not be processed. Make sure you pass valid arguments."
}{
"error": "UNAUTHORIZED",
"description": "Pass a valid API key in the Authorization header as a Bearer token."
}{
"error": "PAYMENT_REQUIRED",
"description": "Insufficient credits. Make sure you have enough credits to make the request."
}{
"error": "FORBIDDEN",
"description": "The request was forbidden. Make sure you pass a valid URL or document that we can access."
}{
"error": "UNSUPPORTED_MEDIA_TYPE",
"description": "The request content type is not supported. Make sure you pass a valid content type."
}{
"error": "TOO_MANY_REQUESTS",
"description": "You have exceeded the rate limit. Please try again later."
}{
"error": "INTERNAL_SERVER_ERROR",
"description": "An unexpected error occurred. Please try again later."
}{
"error": "SERVICE_UNAVAILABLE",
"description": "The service is currently unavailable. Please try again later."
}AI text detection
The Human Score is a metric used by Winston AI to estimate the likelihood that a given piece of content was generated by an AI tool versus being written by a human.
curl --request POST \
--url https://api.gowinston.ai/v2/ai-content-detection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"file": "<string>",
"website": "<string>",
"version": "<string>",
"sentences": true,
"language": "auto"
}
'import requests
url = "https://api.gowinston.ai/v2/ai-content-detection"
payload = {
"text": "<string>",
"file": "<string>",
"website": "<string>",
"version": "<string>",
"sentences": True,
"language": "auto"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
file: '<string>',
website: '<string>',
version: '<string>',
sentences: true,
language: 'auto'
})
};
fetch('https://api.gowinston.ai/v2/ai-content-detection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gowinston.ai/v2/ai-content-detection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'file' => '<string>',
'website' => '<string>',
'version' => '<string>',
'sentences' => true,
'language' => 'auto'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gowinston.ai/v2/ai-content-detection"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"file\": \"<string>\",\n \"website\": \"<string>\",\n \"version\": \"<string>\",\n \"sentences\": true,\n \"language\": \"auto\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gowinston.ai/v2/ai-content-detection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"file\": \"<string>\",\n \"website\": \"<string>\",\n \"version\": \"<string>\",\n \"sentences\": true,\n \"language\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gowinston.ai/v2/ai-content-detection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"file\": \"<string>\",\n \"website\": \"<string>\",\n \"version\": \"<string>\",\n \"sentences\": true,\n \"language\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"score": 123,
"sentences": {
"text": "<string>",
"score": 123
},
"input": "<string>",
"attack_detected": {
"zero_width_space": true,
"homoglyph_attack": true
},
"readability_score": 123,
"credits_used": 123,
"credits_remaining": 123,
"version": "<string>",
"language": "<string>"
}{
"error": "BAD_REQUEST",
"description": "The request was invalid and could not be processed. Make sure you pass valid arguments."
}{
"error": "UNAUTHORIZED",
"description": "Pass a valid API key in the Authorization header as a Bearer token."
}{
"error": "PAYMENT_REQUIRED",
"description": "Insufficient credits. Make sure you have enough credits to make the request."
}{
"error": "FORBIDDEN",
"description": "The request was forbidden. Make sure you pass a valid URL or document that we can access."
}{
"error": "UNSUPPORTED_MEDIA_TYPE",
"description": "The request content type is not supported. Make sure you pass a valid content type."
}{
"error": "TOO_MANY_REQUESTS",
"description": "You have exceeded the rate limit. Please try again later."
}{
"error": "INTERNAL_SERVER_ERROR",
"description": "An unexpected error occurred. Please try again later."
}{
"error": "SERVICE_UNAVAILABLE",
"description": "The service is currently unavailable. Please try again later."
}Authorizations
Body
The Ai content detection request V2
The text to scan. It is required except if you supply a website or a file. Minimum 300 characters. Texts under 600 characters may produce unreliable results and should be avoided. Maximum 150 000 characters per request.
A publicly accessible URL to a file to scan. The file must be publicly available online (not a local file path) so our API can access it. The file must be in plain .pdf, .doc or .docx format. The file has priority over the text, so if you give a text and a file, it's the file that will be scanned.
A website URL to scan. If you supply a website, the API will fetch the content of the website and scan it. The website must be publicly accessible. It's important to know that the website has priority over the text and the file, so if you give a text, a file and a website, it's the website that will be scanned.
The model version to use. Our latest and most accurate version is "5.2". Using "latest" will make sure you are always using the latest version. Options: 5.2, 5.1, 5.0, 4.18, 4.17, 4.16, 4.15, 4.14, 4.13, 4.12, 4.11, 4.10, 4.9, 4.8, 4.7, 4.6, 4.5, 4.4, 4.3, 4.2, 4.1, 4.0, 3.1, 3.0, latest. Default: 5.2. Note: Version 3.1 is identical to 3.0 but preserves newline characters in the returned sentences, while 3.0 removes them.
2 letter language code. Default: auto.
If you put 'auto', the API will automatically detect the language based on the text.
Supported languages [23 languages]:
English (en), French (fr), Spanish (es), Portuguese (pt), Dutch (nl), German (de), Polish (pl), Italian (it), Romanian (ro), Indonesian (id), Tagalog (tl), Russian (ru), Bulgarian (bg), Chinese simplified (zh), Ukrainian (uk), Azerbaijani (az), Czech (cs), Serbian (sr), Belarusian (be), Slovak (sk), Croatian (hr), Bosnian (bs) and Macedonian (mk).
Response
Successful response