TruthCam Developer API

Integrate blockchain-verified image authenticity into your applications

Blockchain Verified

Every image proof is cryptographically secured on Solana blockchain with Merkle tree verification

Fast & Reliable

RESTful API with sub-second response times and 99.9% uptime guarantee

Simple Authentication

OAuth-based login with GitHub/Google and secure API key management

Quick Start

1

Sign Up

Create an account using GitHub or Google OAuth. No credit card required.

Sign Up Now
2

Get Your API Key

Navigate to your dashboard and create a new API key. Free tier includes 1,000 credits.

tc_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ123456
3

Make Your First Request

Verify an image by hash using a simple POST request:

curl -X POST https://truthcam.net/api/v1/public/verify/hash \
  -H "X-API-Key: tc_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "image_hash": "abc123..."
  }'

API Endpoints

POST/api/v1/public/verify/hash

Verify image authenticity by SHA-256 hash. Supports both original and watermarked versions. Returns file_type to indicate if it's the original HEIC or watermarked JPG copy.

View Example Response
{
  "verified": true,
  "image_hash": "abc123...",
  "file_type": "original",  // or "watermarked_copy"
  "batch_id": "batch-uuid",
  "merkle_root": "root-hash",
  "solana_txid": "tx-id",
  "solana_network": "mainnet",
  "ipfs_cid": "Qm...",
  "timestamp": "2024-01-01T00:00:00",
  "message": "Image verified successfully"
}
POST/api/v1/public/verify/hash/batchNEW

Verify multiple images in a single request. Maximum 100 hashes per request. Each hash costs 1 credit.

View cURL Example
curl -X POST https://truthcam.net/api/v1/public/verify/hash/batch \
  -H "X-API-Key: tc_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "hashes": [
      "abc123...",
      "def456...",
      "ghi789..."
    ]
  }'
View Example Response
{
  "results": [
    {
      "image_hash": "abc123...",
      "verified": true,
      "file_type": "original",
      "batch_id": "batch-uuid",
      "solana_txid": "tx-id",
      "timestamp": "2024-01-01T00:00:00",
      "message": "Image verified successfully"
    },
    {
      "image_hash": "def456...",
      "verified": false,
      "message": "Image not found in TruthCam database"
    }
  ],
  "summary": {
    "total": 3,
    "verified": 2,
    "not_found": 1,
    "credits_used": 3
  }
}
POST/api/v1/public/verify/upload

Verify image authenticity by uploading file (multipart/form-data)

View cURL Example
curl -X POST https://truthcam.net/api/v1/public/verify/upload \
  -H "X-API-Key: tc_live_YOUR_KEY_HERE" \
  -F "file=@/path/to/image.jpg"
POST/api/v1/public/verify/printNEW

Verify a re-photographed printout. Detects photo region, applies perspective correction, and uses pHash similarity search to find matching registered images.

View cURL Example
curl -X POST https://truthcam.net/api/v1/public/verify/print \
  -H "X-API-Key: tc_live_YOUR_KEY_HERE" \
  -F "file=@/path/to/printed_photo.jpg"
View Example Response
{
  "verified": true,
  "verification_type": "print",
  "region_detection": {
    "detected": true,
    "perspective_corrected": true,
    "area_ratio": 0.75
  },
  "similar_matches": [
    {
      "image_hash": "abc123...",
      "similarity_level": "very_similar",
      "timestamp": "2024-01-01T00:00:00",
      "location_address": "Seoul, Korea",
      "blockchain_verified": true
    }
  ],
  "qr_check": {
    "qr_detected": true,
    "qr_matches_image": true,
    "message": "QR matches printed image"
  },
  "message": "Print verified - matches registered image",
  "credits_used": 1
}
POST/api/v1/public/register/upload

Register image/video to blockchain (requires write permission, costs 10 credits)

View cURL Example
# Register original file
curl -X POST https://truthcam.net/api/v1/public/register/upload \
  -H "X-API-Key: tc_live_YOUR_KEY_HERE" \
  -F "file=@photo.jpg" \
  -F "proof_type=original"

# Register edited version (linked to original)
curl -X POST https://truthcam.net/api/v1/public/register/upload \
  -H "X-API-Key: tc_live_YOUR_KEY_HERE" \
  -F "file=@photo_edited.jpg" \
  -F "parent_hash=abc123..." \
  -F "proof_type=final" \
  -F "edit_description=Color correction"
View Example Response
{
  "success": true,
  "proof_id": "550e8400-e29b-41d4-a716-446655440000",
  "short_id": "abc12345",
  "image_hash": "abc123def456...",
  "timestamp": "2024-01-01T00:00:00",
  "batch_id": null,
  "status": "queued_for_blockchain",
  "message": "Image registered successfully and queued for blockchain",
  "verify_url": "https://truthcam.net/verify/abc12345"
}
GET/api/v1/public/verify/tree/:hash

Get complete original-final tree for a proof (1 credit)

View Example Response
{
  "original": {
    "image_hash": "abc123...",
    "short_id": "abc12345",
    "proof_type": "original",
    "timestamp": "2024-01-01T00:00:00Z",
    "gps_lat": 37.5,
    "gps_lng": 127.0,
    "location_address": "Seoul, South Korea",
    "verify_url": "https://truthcam.net/verify/abc12345",
    "parent_hash": null,
    "edit_description": null,
    "edit_metadata": null,
    "solana_txid": "tx123...",
    "batch_id": "batch-uuid",
    "created_at": "2024-01-01T00:00:00Z"
  },
  "finals": [
    {
      "image_hash": "def456...",
      "short_id": "def45678",
      "proof_type": "final",
      "parent_hash": "abc123...",
      "edit_description": "Color correction",
      "edit_metadata": {"brightness": 1.2, "contrast": 1.1},
      "timestamp": "2024-01-02T10:00:00Z",
      "solana_txid": "tx456...",
      "batch_id": "batch-uuid-2",
      "verify_url": "https://truthcam.net/verify/def45678"
    }
  ],
  "depth": 1,
  "total_nodes": 2
}
GET/api/v1/public/verify/credits

Check your current credit balance (requires API Key, does NOT deduct credits)

View Example Response
{
  "available_credits": 950,
  "tier": "free",
  "period": "lifetime",
  "message": "Each API call costs 1 credit. Credits never expire."
}

TruthDesk Integration (New!)

Desktop applications can now register files to blockchain and track original-final relationships. Perfect for photo editing workflows where you want to link edited versions back to originals.

Register original files (10 credits)
Link edited versions to originals (10 credits)
Query file relationships and edit history (1 credit)

Credit Packages

Purchase API credits with no expiration. Use them anytime, at your own pace.

Free

0 SOL
  • 1,000 API credits
  • No expiration
  • Community support
Get Started
POPULAR

Pro Pack

0.2 SOL
  • 60,000 API credits
  • +10K bonus (20%)
  • No expiration
  • Priority support
Buy Credits

Business Pack

0.7 SOL
  • 250,000 API credits
  • +50K bonus (25%)
  • No expiration
  • Premium support
Buy Credits

Need Help?

Download our bulk verification app or reach out to our support team