curl --request POST \
--url https://app.surferseo.com/api/v1/ai_detector/detect \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"max_chunk_size": 4195,
"semantic_chunking": true
}
'import requests
url = "https://app.surferseo.com/api/v1/ai_detector/detect"
payload = {
"text": "<string>",
"max_chunk_size": 4195,
"semantic_chunking": True
}
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', max_chunk_size: 4195, semantic_chunking: true})
};
fetch('https://app.surferseo.com/api/v1/ai_detector/detect', 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://app.surferseo.com/api/v1/ai_detector/detect",
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>',
'max_chunk_size' => 4195,
'semantic_chunking' => true
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://app.surferseo.com/api/v1/ai_detector/detect"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"max_chunk_size\": 4195,\n \"semantic_chunking\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
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://app.surferseo.com/api/v1/ai_detector/detect")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"max_chunk_size\": 4195,\n \"semantic_chunking\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v1/ai_detector/detect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"max_chunk_size\": 4195,\n \"semantic_chunking\": true\n}"
response = http.request(request)
puts response.read_body{
"ai_probability": 0.9,
"chunks": [
{
"ai_probability": 0.9,
"text": "This is a test text"
}
],
"model": "surfer-ai-detector-v1"
}Detect AI content in a text
Detects AI content in a text.
Rate limit: 60 requests/min
curl --request POST \
--url https://app.surferseo.com/api/v1/ai_detector/detect \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"max_chunk_size": 4195,
"semantic_chunking": true
}
'import requests
url = "https://app.surferseo.com/api/v1/ai_detector/detect"
payload = {
"text": "<string>",
"max_chunk_size": 4195,
"semantic_chunking": True
}
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', max_chunk_size: 4195, semantic_chunking: true})
};
fetch('https://app.surferseo.com/api/v1/ai_detector/detect', 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://app.surferseo.com/api/v1/ai_detector/detect",
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>',
'max_chunk_size' => 4195,
'semantic_chunking' => true
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://app.surferseo.com/api/v1/ai_detector/detect"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"max_chunk_size\": 4195,\n \"semantic_chunking\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
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://app.surferseo.com/api/v1/ai_detector/detect")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"max_chunk_size\": 4195,\n \"semantic_chunking\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v1/ai_detector/detect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"max_chunk_size\": 4195,\n \"semantic_chunking\": true\n}"
response = http.request(request)
puts response.read_body{
"ai_probability": 0.9,
"chunks": [
{
"ai_probability": 0.9,
"text": "This is a test text"
}
],
"model": "surfer-ai-detector-v1"
}Authorizations
Body
The text to detect AI content in
100000The maximum size of the chunk. The unit is tokens number we use for the given model. If not specified we will use largest chunk size possible for the given model.
The maximum chunk sizes for models are:
surfer-ai-detector-v1: 510surfer-ai-detector-v2: 8190surfer-ai-detector-v3: 8190
200 <= x <= 8190The model to use for detection. We advise not specifying this option for the best results.
We reserve the right to deprecate models in the future. If the model you selected is deprecated, we will use the default model instead.
surfer-ai-detector-v1, surfer-ai-detector-v2, surfer-ai-detector-v3 Whether to use semantic chunking.
If enabled, for each chunk, we will find the largest semantic part of the text that is not longer than max_chunk_size.
Response
OK
Probability that the text is AI-generated
0.9
Chunks of the text that were used for detection
Show child attributes
Show child attributes
[
{
"ai_probability": 0.9,
"text": "This is a test text"
}
]
The model that was used for detection
"surfer-ai-detector-v1"
Was this page helpful?