Skip to main content

AI Identifiers Python SDK

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

pip install aiidentifiers

50 free API calls/month — no credit card. Get your key at aiidentifiers.com/get-api-key.


Quick Start

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

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

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

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 →

Metadata

Release files for aiidentifiers 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiidentifiers 2.0.0
File Size Uploaded Provenance
aiidentifiers-2.0.0.tar.gz 11.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aiidentifiers 2.0.0
File Interpreter ABI Platform
aiidentifiers-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / aiidentifiers-2.0.0.tar.gz

Download URL aiidentifiers-2.0.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4e8744e8d2a5cd57c0a8b1dfecd3bb0d523478f139a87f096f88719cc9f5c4ec
BLAKE2b-256 checksum
How to use checksums
44dcdf44b0c20781512fb972d275b10a02b99aa601e992e0df082a7acb444112
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.14

Release files / aiidentifiers-2.0.0-py3-none-any.whl

Download URL aiidentifiers-2.0.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cdb1a721d87a20a3bef2382e2b2d5e00323f4375a5693134848520e61ef3b57
BLAKE2b-256 checksum
How to use checksums
c51b6ef736f7f04cb7fcabfb31c9c81ec6d8f688cd9b2f314e906f714ccc3408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.14

Security for aiidentifiers 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page