Base URL

https://api.qwip.io

Environment: Production (public beta)

Protocol: HTTPS only (TLS 1.3)

Rate Limit: 100 requests per minute per IP address

Authentication

No authentication required. The API is publicly accessible for reading and writing. Rate limiting is based on IP address to prevent abuse.

Note: Future versions may introduce optional API keys for higher rate limits or advanced features. For now, the API is completely open.

Response Format

All responses are in JSON format with UTF-8 encoding.

Success Response

{ "success": true, "data": { // ... endpoint-specific data } }

Error Response

{ "success": false, "error": "Error message" }

Endpoints

POST /api/check

Query the community database to see if an image (identified by its BLAKE3 hash) has been analyzed before. Returns aggregated detection results from community contributions.

Request Body

Parameter Type Required Description
blake3Hash string Required 64-character hexadecimal BLAKE3 content hash of the image

Example Request

POST /api/check Content-Type: application/json { "blake3Hash": "a7f3d8c9e2b4f1a6d5c3e8b7a2f9d4c1b6e3a8f7d2c9b5e4a1f8d3c7b2e6a9f4" }

Response (Found)

{ "found": true, "data": { "likelyAI": true, "confidence": 0.87, "modelUsed": "cifake", "voteCount": 5, "firstSeen": "2025-12-15T10:30:00Z", "lastSeen": "2025-12-27T14:22:00Z" } }

Response (Not Found)

{ "found": false }

Response Fields

Field Type Description
found boolean Whether the hash exists in the database
likelyAI boolean Community consensus: true if likely AI-generated
confidence number Aggregated confidence score (0.0 - 1.0)
modelUsed string Most common model used for detection
voteCount number Number of independent analyses contributed
firstSeen string ISO 8601 timestamp of first contribution
lastSeen string ISO 8601 timestamp of most recent contribution
POST /api/contribute

Contribute a detection result to the community database. This helps build a shared knowledge base of AI-generated images. All contributions are anonymous.

Request Body

Parameter Type Required Description
blake3Hash string Required 64-character hex BLAKE3 hash
hashVector object Required 5 perceptual hashes (see below)
likelyAI boolean Required Detection result (true = AI)
confidence number Required Model confidence (0.0 - 1.0)
modelUsed string Required "cifake", "genimage", "mobilevit", or "unknown"

Hash Vector Object

Field Type Description
mean string Mean perceptual hash (64-bit integer as string)
gradient string Gradient perceptual hash
doubleGradient string Double gradient perceptual hash
block string Block median perceptual hash
dct string DCT perceptual hash

Example Request

POST /api/contribute Content-Type: application/json { "blake3Hash": "a7f3d8c9e2b4f1a6d5c3e8b7a2f9d4c1b6e3a8f7d2c9b5e4a1f8d3c7b2e6a9f4", "hashVector": { "mean": "18379468920823898112", "gradient": "18015498021093556224", "doubleGradient": "18374389475892961280", "block": "18302628773641904128", "dct": "18374673854875439104" }, "likelyAI": true, "confidence": 0.87, "modelUsed": "cifake" }

Response

{ "success": true, "isNew": false, "voteCount": 6, "message": "Contribution recorded, aggregated with 5 existing votes" }

Response Fields

Field Type Description
success boolean Whether contribution was recorded
isNew boolean True if this is the first analysis of this image
voteCount number Total number of analyses (including this one)
message string Human-readable confirmation message

Error Codes

HTTP Status Meaning Common Causes
200 Success Request completed successfully
400 Bad Request Invalid hash format, missing required fields, invalid model name
429 Rate Limited Exceeded 100 requests/minute from your IP
500 Server Error Database connection failure or internal error

Vote Aggregation Algorithm

When multiple users analyze the same image, their results are combined using a weighted average:

// New confidence score new_confidence = (old_confidence ร— vote_count + contribution_confidence) รท (vote_count + 1) // Increment vote counter vote_count = vote_count + 1 // Update consensus (majority vote) likely_ai = (ai_votes > real_votes)

This ensures that the confidence score reflects the average opinion of all contributors, giving equal weight to each analysis.

Code Examples

JavaScript (Fetch API)

// Query for existing result const response = await fetch('https://api.qwip.io/api/check', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ blake3Hash: 'a7f3d8c9e2b4f1a6...' }) }); const data = await response.json(); if (data.found) { console.log(`AI probability: ${data.data.confidence}`); }

Python (Requests)

import requests # Contribute detection result response = requests.post( 'https://api.qwip.io/api/contribute', json={ 'blake3Hash': 'a7f3d8c9e2b4f1a6...', 'hashVector': { 'mean': '18379468920823898112', 'gradient': '18015498021093556224', 'doubleGradient': '18374389475892961280', 'block': '18302628773641904128', 'dct': '18374673854875439104' }, 'likelyAI': True, 'confidence': 0.87, 'modelUsed': 'cifake' } ) print(response.json())

cURL

curl -X POST https://api.qwip.io/api/check \ -H "Content-Type: application/json" \ -d '{"blake3Hash":"a7f3d8c9e2b4f1a6..."}'
Important Notes:

Need Help or Have Questions?

We're here to help you integrate with the Qwip API.

Full Documentation โ†’ Report Issues โ†’ Contact Support โ†’