Metadata-Version: 2.4
Name: aiidentifiers
Version: 2.0.0
Summary: Multi-modal AI content detection with per-model provenance
Home-page: https://aiidentifiers.com
Author: AI Identifiers
Author-email: support@aiidentifiers.com
Project-URL: Documentation, https://aiidentifiers.com/api-docs
Project-URL: Source, https://github.com/marva6116/Best-Detection-app-7
Project-URL: Tracker, https://github.com/marva6116/Best-Detection-app-7/issues
Keywords: ai detection deepfake synthid mcp langchain
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0
Provides-Extra: langchain
Requires-Dist: langchain>=0.1.0; extra == "langchain"
Provides-Extra: llamaindex
Requires-Dist: llama-index-core>=0.10.0; extra == "llamaindex"
Provides-Extra: crewai
Requires-Dist: crewai>=0.1.0; extra == "crewai"
Provides-Extra: all
Requires-Dist: langchain>=0.1.0; extra == "all"
Requires-Dist: llama-index-core>=0.10.0; extra == "all"
Requires-Dist: crewai>=0.1.0; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# AI Identifiers Python SDK

Multi-modal AI content detection with per-model provenance — text, images, audio, and video in one call.

```bash
pip install aiidentifiers
```

**50 free API calls/month — no credit card.** Get your key at [aiidentifiers.com/get-api-key](https://aiidentifiers.com/get-api-key).

---

## Quick Start

```python
from aiidentifiers import Client

client = Client(api_key="aid_...")

# ── Text detection ─────────────────────────────────────────────────────────
result = client.detect_text("This essay was drafted by an AI writing assistant.")
print(result.verdict)       # "ai_generated"
print(result.confidence)    # 88
print(result.is_ai_generated)  # True

# Per-model provenance (the key differentiator)
for p in result.provenance:
    print(f"  {p.model} ({p.provider}): {p.verdict} — {p.confidence}%")
# GPT-5 Text Analysis (openai): ai_generated — 92%
# Claude 4 Opus (anthropic): ai_generated — 88%
# Gemini 2.0 Flash (google): human_generated — 71%
# o1/o3 Reasoning (openai): ai_generated — 95%

# ── URL detection (image/video/audio/text — auto-detected) ────────────────
result = client.detect_url("https://example.com/image.jpg")
print(result.summary())

# ── Local file detection ───────────────────────────────────────────────────
result = client.detect_file("/path/to/audio.mp3")
result = client.detect_file("/path/to/video.mp4")
result = client.detect_file("/path/to/image.png")

# ── Quota check ────────────────────────────────────────────────────────────
quota = client.quota()
print(f"{quota.used}/{quota.limit} calls used ({quota.plan} plan, resets {quota.resets_at})")
print(f"{quota.remaining} calls remaining")
```

---

## Response Format

Every `DetectionResult` contains:

| Field | Type | Description |
|-------|------|-------------|
| `verdict` | `str` | `"ai_generated"` \| `"human_generated"` \| `"uncertain"` |
| `confidence` | `int` | 0–100 ensemble confidence score |
| `is_ai_generated` | `bool` | Convenience boolean |
| `modality` | `str` | `"text"` \| `"image"` \| `"video"` \| `"audio"` |
| `provenance` | `list[ProvenanceScore]` | Per-model breakdown |
| `processing_time_ms` | `int` | Wall-clock time in ms |
| `quota` | `QuotaInfo` | Quota status after this call |

---

## LangChain Integration

```python
from aiidentifiers.integrations.langchain import get_tools
from langchain.agents import AgentExecutor, create_openai_functions_agent
from langchain_openai import ChatOpenAI

tools  = get_tools(api_key="aid_...")
llm    = ChatOpenAI(model="gpt-4o")
agent  = create_openai_functions_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({
    "input": "Is this image AI-generated? https://example.com/photo.jpg"
})
```

## LlamaIndex Integration

```python
from aiidentifiers.integrations.llamaindex import create_ai_identifiers_tools
from llama_index.core.agent import ReActAgent

tools = create_ai_identifiers_tools(api_key="aid_...")
agent = ReActAgent.from_tools(tools, verbose=True)
agent.chat("Check if this text was written by an AI: 'Leveraging synergies...'")
```

## CrewAI Integration

```python
from aiidentifiers.integrations.crewai import AIIdentifiersDetectionTool
from crewai import Agent, Task, Crew

tool  = AIIdentifiersDetectionTool(api_key="aid_...")
agent = Agent(role="Fact Checker", tools=[tool], ...)
```

---

## Pricing

| Plan | Quota | Price |
|------|-------|-------|
| Free | 50 calls/month | $0 — no credit card |
| Pro | 10,000 calls/month | $10/month |
| Enterprise | 100,000 calls/month | $50+/month |

[Get started →](https://aiidentifiers.com/get-api-key)
