AI Detection
curl --request POST \
--url https://nano-gpt.com/api/v1/ai-detectionimport requests
url = "https://nano-gpt.com/api/v1/ai-detection"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://nano-gpt.com/api/v1/ai-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://nano-gpt.com/api/v1/ai-detection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://nano-gpt.com/api/v1/ai-detection"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://nano-gpt.com/api/v1/ai-detection")
.asString();require 'uri'
require 'net/http'
url = URI("https://nano-gpt.com/api/v1/ai-detection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEndpoint Examples
AI Detection
AI-text and plagiarism detection endpoint
POST
/
api
/
v1
/
ai-detection
AI Detection
curl --request POST \
--url https://nano-gpt.com/api/v1/ai-detectionimport requests
url = "https://nano-gpt.com/api/v1/ai-detection"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://nano-gpt.com/api/v1/ai-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://nano-gpt.com/api/v1/ai-detection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://nano-gpt.com/api/v1/ai-detection"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://nano-gpt.com/api/v1/ai-detection")
.asString();require 'uri'
require 'net/http'
url = URI("https://nano-gpt.com/api/v1/ai-detection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyOverview
UsePOST /api/v1/ai-detection to run AI-text detection or plagiarism detection on a text input.
Endpoint
POST https://nano-gpt.com/api/v1/ai-detection
Authentication
An API key is required.Authorization: Bearer YOUR_API_KEYx-api-key: YOUR_API_KEY
Request Body
{
"text": "Text to analyze...",
"mode": "ai"
}
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | - | Text to analyze. |
mode | string | No | ai | Detection mode. Allowed values: ai, plagiarism. |
Modes
| Mode | Description |
|---|---|
ai | AI-text detection. |
plagiarism | Plagiarism detection. |
Response
{
"object": "ai_detection.result",
"mode": "ai",
"model": "pangram-ai-detection",
"content": "Human-readable summary",
"result": {
"score": 0.12
},
"word_count": 250,
"usage": {
"prompt_tokens": 300,
"completion_tokens": 50,
"total_tokens": 350
},
"pricing": {
"amount": 0.01,
"currency": "USD"
}
}
Example
curl -X POST https://nano-gpt.com/api/v1/ai-detection \
-H "Authorization: Bearer $NANOGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Text to analyze...",
"mode": "ai"
}'
Common Errors
| Code | Description |
|---|---|
missing_api_key | API key is required. |
invalid_json | Request body is not valid JSON. |
invalid_mode | mode is not ai or plagiarism. |
missing_text | text is required. |
model_not_allowed | Detection model is not available for the account or route. |
paid_features_disabled | Paid API features are disabled for the account. |
insufficient_balance | Account balance is too low for the request. |