Identify which AI provider generated a response
AIFinder exposes a free, public endpoint for programmatic classification. No API key required.
Send a JSON body with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | The AI-generated text to classify (min 20 chars) |
top_n |
integer | No | Number of results to return (default: 5) |
{
"provider": "Anthropic",
"confidence": 87.42,
"top_providers": [
{ "name": "Anthropic", "confidence": 87.42 },
{ "name": "OpenAI", "confidence": 6.15 },
{ "name": "Google", "confidence": 3.28 },
{ "name": "xAI", "confidence": 1.74 },
{ "name": "DeepSeek", "confidence": 0.89 }
]
}
| Field | Type | Description |
|---|---|---|
provider |
string | Best-matching provider name |
confidence |
float | Confidence % for the top provider |
top_providers |
array | Ranked list of { name, confidence } objects |
| Status | Meaning |
|---|---|
400 | Missing text field or text shorter than 20 characters |
429 | Rate limit exceeded (60 requests/minute per IP) |
curl -X POST https://huggingface.co/spaces/CompactAI/AIFinder/v1/classify \
-H "Content-Type: application/json" \
-d '{
"text": "I would be happy to help you with that! Here is a detailed explanation of how neural networks work...",
"top_n": 5
}'
import re
import requests
API_URL = "https://huggingface.co/spaces/CompactAI/AIFinder/v1/classify"
def strip_think_tags(text):
"""Remove <think>/<thinking> blocks before classifying."""
return re.sub(r"<think(?:ing)?>.*?</think(?:ing)?>",
"", text, flags=re.DOTALL).strip()
text = """I'd be happy to help! Neural networks are
computational models inspired by the human brain..."""
# Strip thought tags first (the API does this too,
# but saves bandwidth to do it client-side)
cleaned = strip_think_tags(text)
response = requests.post(API_URL, json={
"text": cleaned,
"top_n": 5
})
data = response.json()
print(f"Provider: {data['provider']} ({data['confidence']:.1f}%)")
for p in data["top_providers"]:
print(f" {p['name']:<20s} {p['confidence']:5.1f}%")
const API_URL = "https://huggingface.co/spaces/CompactAI/AIFinder/v1/classify";
function stripThinkTags(text) {
return text.replace(/<think(?:ing)?>[\s\S]*?<\/think(?:ing)?>/g, "").trim();
}
async function classify(text, topN = 5) {
const cleaned = stripThinkTags(text);
const res = await fetch(API_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: cleaned, top_n: topN })
});
return res.json();
}
// Usage
classify("I'd be happy to help you understand...")
.then(data => {
console.log(`Provider: ${data.provider} (${data.confidence}%)`);
data.top_providers.forEach(p =>
console.log(` ${p.name}: ${p.confidence}%`)
);
});
const API_URL = "https://huggingface.co/spaces/CompactAI/AIFinder/v1/classify";
async function classify(text, topN = 5) {
const cleaned = text
.replace(/<think(?:ing)?>[\s\S]*?<\/think(?:ing)?>/g, "")
.trim();
const res = await fetch(API_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: cleaned, top_n: topN })
});
if (!res.ok) {
const err = await res.json();
throw new Error(err.error || `HTTP ${res.status}`);
}
return res.json();
}
// Example
(async () => {
const result = await classify(
"Let me think about this step by step...",
3
);
console.log(result);
})();
Test the API right here — paste any AI-generated text and hit Send.
The classifier currently supports these providers: