Identify which AI provider generated a response

Connecting to API...
Paste AI Response
Result
- -
    Wrong? Correct the provider to train the model:

    Public Classification API

    AIFinder exposes a free, public endpoint for programmatic classification. No API key required.

    POST /v1/classify
    No API Key 60 req/min

    Request

    Send a JSON body with Content-Type: application/json.

    FieldTypeRequiredDescription
    text string Yes The AI-generated text to classify (min 20 chars)
    top_n integer No Number of results to return (default: 5)
    ⚠️ Strip thought tags!
    Many reasoning models wrap chain-of-thought in <think>…</think> or <thinking>…</thinking> blocks. These confuse the classifier. The API strips them automatically, but you should remove them on your side too to save bandwidth.

    Response

    JSON
    {
      "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  }
      ]
    }
    FieldTypeDescription
    provider string Best-matching provider name
    confidence float Confidence % for the top provider
    top_providers array Ranked list of { name, confidence } objects

    Errors

    StatusMeaning
    400Missing text field or text shorter than 20 characters
    429Rate limit exceeded (60 requests/minute per IP)

    Code Examples

    cURL

    Bash
    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
      }'

    Python

    Python
    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}%")

    JavaScript (fetch)

    JavaScript
    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}%`)
        );
      });

    Node.js

    JavaScript (Node)
    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);
    })();

    Try It

    Test the API right here — paste any AI-generated text and hit Send.

    Supported Providers

    The classifier currently supports these providers: