Verify content authenticity and detect AI-generated media using C2PA technology
Live Demo β’ Documentation β’ Report Bug β’ Request Feature
- About
- Features
- Demo
- Quick Start
- Installation
- Usage
- Project Structure
- API Documentation
- Supported Platforms
- Contributing
- Roadmap
- License
- Acknowledgments
Huminify is a comprehensive AI content detection system that uses C2PA (Coalition for Content Provenance and Authenticity) technology to verify the authenticity of images and videos. It helps you determine if content was AI-generated or human-created by analyzing embedded Content Credentials.
- β 100% Free & Open Source - No hidden costs, fully transparent
- β C2PA Verified - Industry-standard content authenticity
- β Multi-Platform Support - Detects OpenAI, Google, Adobe, Microsoft
- β Dual Implementation - Python (full-featured) & TypeScript (lightweight)
- β Easy Integration - REST API, CLI, and Next.js web app
- β Production Ready - Clean architecture, well-documented
- Local FastAPI server for C2PA manifest validation
- Extracts comprehensive metadata (creator, company, software, certificates)
- Detects 30+ AI generators
- Works for images and videos
- Direct file reading using c2pa-python library
- Works offline without API
- Handles invalid/expired signatures with raw data extraction
- Works for images and videos
- Image AI detection using Hugging Face models
- Provides confidence scores when C2PA unavailable
- ~70-85% accuracy (use with caution)
- Images only - not available for videos
| Type | Formats | C2PA Detection | AI Fallback |
|---|---|---|---|
| Images | PNG, JPEG, WebP, HEIC, AVIF | β | β |
| Videos | MP4, MOV, AVI, WebM, MKV | β | β |
Working C2PA Implementations:
- β Adobe Firefly (images)
- β Adobe Premiere Pro (videos)
- β OpenAI ChatGPT/DALL-E (images)
- β OpenAI Sora (videos)
- β Microsoft Designer (images)
- β Google Gemini (images)
- β Google Pixel Camera (images)
200+ C2PA Coalition Members (various implementation stages)
Visit our live demo: huminify.vercel.app
$ python bin/detector.py examples/ChatGPT_Image.png
π C2PA API: ai_confirmed_api
π€ AI GENERATION DETECTED!
Software: ChatGPT
Organization: OpenAI
Certificate: Truepic Lens CLI in Sora
AI Assertions: AI Generator: ChatGPT
π― VERDICT: AI_DETECTED_C2PA_API
Confidence: HIGH| Version | Best For | Features |
|---|---|---|
| Python | Full-featured detection | C2PA + AI models, CLI, API server |
| TypeScript | Lightweight & serverless | C2PA only, Express, Next.js |
| Next.js Web App | End users | Beautiful UI, drag-and-drop, instant results |
# 1. Clone the repository
git clone https://github.com/Yogesh1290/huminify-c2pa-detector.git
cd huminify-c2pa-detector
# 2. Run setup
setup.bat # Windows
# or
./setup.sh # Linux/Mac
# 3. Analyze content
run.bat examples/ChatGPT_Image.png # Windows
# or
./run.sh examples/ChatGPT_Image.png # Linux/Mac# Navigate to TypeScript directory
cd typescript-api
# Install dependencies
npm install
# Start server
npm start
# Test API
curl -X POST http://localhost:3000/api/detect \
-F "file=@../examples/test.png"# Navigate to Next.js app
cd typescript-api/example-nextjs-app
# Install dependencies
npm install
# Start development server
npm run dev
# Open browser
# Visit http://localhost:3000For Python Version:
- Python 3.8 or higher
- pip (Python package manager)
- 2GB+ RAM (for AI models)
For TypeScript Version:
- Node.js 18 or higher
- npm or yarn
- 500MB+ RAM
# Clone repository
git clone https://github.com/Yogesh1290/huminify-c2pa-detector.git
cd huminify-c2pa-detector
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Verify installation
python verify_setup.py# Navigate to TypeScript directory
cd typescript-api
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Install C2PA CLI (required)
npm install -g @contentauth/c2pa-node
# Start server
npm start# Navigate to Next.js app
cd typescript-api/example-nextjs-app
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start# Activate virtual environment (one-time per session)
activate.bat # Windows
# or
source venv/bin/activate # Linux/Mac
# Analyze image
python bin/detector.py image.png
# Analyze video
python bin/detector.py video.mp4
# Start API server
python bin/server.py# Easiest way - no activation needed
run.bat examples/test.png
start_api_server.bat# Start server
python bin/server.py
# Server runs at http://localhost:8000
# API docs at http://localhost:8000/docsAPI Endpoints:
POST /validate/file- Upload file for validationPOST /validate/base64- Validate base64-encoded dataPOST /validate/url- Validate file from URLGET /health- Health checkGET /docs- Interactive API documentation
# Start Express server
cd typescript-api
npm start
# Server runs at http://localhost:3000API Endpoint:
# Detect AI content
curl -X POST http://localhost:3000/api/detect \
-F "file=@image.png"Response:
{
"success": true,
"data": {
"file": "image.png",
"fileType": "image/png",
"c2paStatus": "FOUND",
"verdict": "AI_DETECTED_C2PA",
"confidence": "HIGH",
"platform": "openai",
"company": "OpenAI",
"c2paInfo": {
"aiGenerated": true,
"signatureValid": true,
"software": "DALL-E 3",
"organization": "OpenAI"
}
}
}# Development
cd typescript-api/example-nextjs-app
npm run dev
# Visit http://localhost:3000
# Production build
npm run build
npm start
# Deploy to Vercel
vercel deployimport { useState } from 'react';
function AIDetector() {
const [result, setResult] = useState(null);
const handleUpload = async (file: File) => {
const formData = new FormData();
formData.append('file', file);
const response = await fetch('/api/detect', {
method: 'POST',
body: formData,
});
const data = await response.json();
setResult(data);
};
return (
<div>
<input type="file" onChange={(e) => handleUpload(e.target.files[0])} />
{result && <div>Verdict: {result.data.verdict}</div>}
</div>
);
}import requests
with open('image.jpg', 'rb') as f:
files = {'file': f}
response = requests.post(
'http://localhost:8000/validate/file',
files=files
)
result = response.json()
print(result)const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const formData = new FormData();
formData.append('file', fs.createReadStream('image.jpg'));
axios.post('http://localhost:3000/api/detect', formData, {
headers: formData.getHeaders()
})
.then(response => console.log(response.data))
.catch(error => console.error(error));huminify-c2pa-detector/
βββ π bin/ # Entry point scripts
β βββ detector.py # CLI detector
β βββ server.py # API server
β
βββ π src/ # Python source code
β βββ π api/ # FastAPI server
β β βββ server.py # App initialization
β β βββ routes.py # Route handlers
β β βββ models.py # Request/response models
β βββ π core/ # Core detection logic
β β βββ detector.py # Main orchestrator
β β βββ c2pa_reader.py # C2PA reading
β β βββ api_client.py # API communication
β βββ π models/ # AI detection models
β β βββ image_detector.py # Image AI detection
β βββ π platforms/ # Platform extractors
β β βββ base.py # Base class
β β βββ registry.py # Platform registry
β β βββ openai.py # OpenAI extractor
β β βββ google.py # Google extractor
β β βββ adobe.py # Adobe extractor
β β βββ microsoft.py # Microsoft extractor
β β βββ TEMPLATE.py # New platform template
β βββ π utils/ # Utilities
β βββ console.py # Console formatting
β
βββ π typescript-api/ # TypeScript version
β βββ π src/ # TypeScript source
β β βββ π config/ # Configuration
β β βββ π services/ # Business logic
β β βββ π routes/ # Express routes
β β βββ π types/ # TypeScript types
β β βββ π utils/ # Utilities
β βββ π example-nextjs-app/ # Next.js web application
β β βββ π pages/ # Next.js pages
β β β βββ index.tsx # Home page
β β β βββ docs.tsx # Documentation
β β β βββ π api/ # API routes
β β βββ π components/ # React components
β β βββ π lib/ # Client libraries
β β βββ π styles/ # CSS styles
β β βββ π public/ # Static assets
β βββ package.json
β βββ README.md
β
βββ π docs/ # Documentation
β βββ QUICK_START.md
β βββ SETUP_INSTRUCTIONS.md
β βββ C2PA_COMPANIES_2025.md
β βββ ENHANCED_METADATA.md
β
βββ π examples/ # Test images/videos
β βββ ChatGPT_Image.png
β βββ test2.png
β βββ videotest.mp4
β
βββ π tools/ # Utility scripts
β βββ extract_c2pa_raw.py
β βββ inspect_manifest.py
β βββ download_test_images.py
β
βββ requirements.txt # Python dependencies
βββ setup.bat # Windows setup
βββ run.bat # Quick run script
βββ activate.bat # Activate venv
βββ README.md # This file
βββ ARCHITECTURE.md # Architecture docs
βββ CONTRIBUTING.md # Contribution guide
βββ CHANGELOG.md # Version history
βββ LICENSE # MIT License
Base URL: http://localhost:8000
Upload a file for C2PA validation.
Request:
curl -X POST http://localhost:8000/validate/file \
-F "file=@image.png"Response:
{
"status": "ai_confirmed_api",
"verdict": "AI_DETECTED_C2PA_API",
"confidence": "high",
"metadata": {
"company": "OpenAI",
"software": "ChatGPT",
"ai_generated": true
}
}Validate base64-encoded content.
Validate content from URL.
Health check endpoint.
Interactive API documentation (Swagger UI).
Base URL: http://localhost:3000
Detect AI-generated content.
Request:
curl -X POST http://localhost:3000/api/detect \
-F "file=@image.png"Response:
{
"success": true,
"data": {
"file": "image.png",
"verdict": "AI_DETECTED_C2PA",
"confidence": "HIGH",
"platform": "openai",
"c2paInfo": {
"aiGenerated": true,
"signatureValid": true
}
}
}Health check endpoint.
List supported platforms.
| Platform | Type | Status | C2PA Support |
|---|---|---|---|
| OpenAI | ChatGPT, DALL-E, Sora | β Working | Full |
| Adobe | Firefly, Premiere Pro | β Working | Full |
| Gemini, Pixel Camera | β Working | Full | |
| Microsoft | Designer | β Working | Full |
Want to add support for a new platform? It's easy!
- Copy the template:
cp src/platforms/TEMPLATE.py src/platforms/newplatform.py- Implement the extractor:
class NewPlatformExtractor(BasePlatformExtractor):
def __init__(self):
self.company_name = "NewPlatform"
self.markers = ["NewPlatform", "NP"]
self.ai_indicators = ["ai_generated"]
def extract_metadata(self, manifest, raw_data):
metadata = {
"company": self.company_name,
"detected_markers": self.search_raw_data(raw_data)
}
return metadata
def is_ai_generated(self, metadata):
return len(metadata.get("detected_markers", [])) > 0- Register in registry:
# src/platforms/registry.py
from .newplatform import NewPlatformExtractor
class PlatformRegistry:
def __init__(self):
self.extractors = {
"openai": OpenAIExtractor(),
"google": GoogleExtractor(),
"adobe": AdobeExtractor(),
"microsoft": MicrosoftExtractor(),
"newplatform": NewPlatformExtractor() # Add here
}- Test and submit PR!
See src/platforms/README.md for detailed guide.
We love contributions! Huminify is open source and community-driven.
- π Report bugs - Found an issue? Open a bug report
- β¨ Suggest features - Have an idea? Request a feature
- π Improve docs - Help make our documentation better
- π§ Submit PRs - Fix bugs or add features
- β Star the repo - Show your support!
# Fork and clone
git clone https://github.com/YOUR_USERNAME/huminify-c2pa-detector.git
cd huminify-c2pa-detector
# Create branch
git checkout -b feature/amazing-feature
# Make changes and test
python bin/detector.py examples/test.png
# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature
# Open Pull Request-
Code Style
- Python: Follow PEP 8
- TypeScript: Follow ESLint rules
- Add comments for complex logic
-
Testing
- Test your changes thoroughly
- Include test cases if applicable
-
Documentation
- Update README if needed
- Add docstrings to functions
- Update CHANGELOG.md
-
Commit Messages
- Use clear, descriptive messages
- Format:
type: description - Examples:
feat: add video support,fix: resolve API error
See CONTRIBUTING.md for detailed guidelines.
- β Python implementation with 3-layer detection
- β TypeScript/Express API
- β Next.js web application
- β Image and video support
- β Multi-platform detection
- π Docker containerization
- π Batch processing support
- π Database integration
- π Enhanced error handling
- π Audio file support
- π PDF document support
- π Advanced analytics dashboard
- π REST API client libraries
- π Webhook support
- π Cloud deployment guides
- Mobile app (React Native)
- Browser extension
- WordPress plugin
- Zapier integration
- Enterprise features
Have a feature request? Open an issue!
Current Reality (Feb 2025):
- Only 4-5 tools have full C2PA implementation
- Most images on the internet don't have C2PA metadata
- Popular tools like Midjourney don't support C2PA yet
- Older content lacks C2PA (standard is relatively new)
What This Means:
- β High accuracy when C2PA is present
β οΈ Limited coverage - most content won't have C2PA- π Growing adoption - more tools adding support
Image Detection (Layer 3):
- ~70-85% accuracy
- Best used as fallback when C2PA unavailable
- Not 100% reliable
- Can produce false positives/negatives
Text Detection:
- β Not supported - fundamentally unreliable
- Even OpenAI shut down their text detector
- Different models give contradictory results
- Trust C2PA first - Most reliable when available
- Use AI models as fallback - Not primary detection
- Verify critical content - Don't rely solely on automated detection
- Stay updated - C2PA adoption is growing
See docs/REALITY_CHECK.md for detailed analysis.
This project is licensed under the MIT License - see the LICENSE file for details.
β You can:
- Use commercially
- Modify the code
- Distribute
- Use privately
β You cannot:
- Hold liable
- Use trademark
π You must:
- Include license and copyright notice
- State changes made
- C2PA - Content Authenticity Initiative
- c2pa-python - C2PA Python library
- @contentauth/c2pa-node - C2PA Node.js library
- FastAPI - Modern Python web framework
- Next.js - React framework
- Hugging Face - AI model hosting
- Content Authenticity Initiative (CAI) - Leading C2PA adoption
- 200+ C2PA Coalition Members - Building the future of content authenticity
- All contributors who have helped improve this project
- Users who report bugs and suggest features
- Everyone working towards content authenticity
- π Documentation: huminify.vercel.app/docs
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Issues
- π¬ Discussions: GitHub Discussions
- C2PA Specification: https://c2pa.org/specifications/
- Content Authenticity: https://contentauthenticity.org/
- Verify Tool: https://verify.contentauthenticity.org/
If you find Huminify useful, please consider:
- β Star this repository on GitHub
- π¦ Share on social media - Help spread the word
- π Write a blog post - Share your experience
- π€ Contribute - Submit PRs or report issues
- π¬ Provide feedback - Tell us what you think
Star β this repo if you find it useful!
