Quick Start Guide

Get up and running with TruthMark in under 5 minutes.

1

Create an Account

Sign up for a free account to get started. You'll receive 100 image watermarks per month on the free tier.

Sign Up Free
2

Install SDK

Choose your preferred language:

Python
pip install truthmark-sdk
JavaScript/Node.js
npm install @truthmark/sdk
3

Encode Your First Image

Before you encode: For stronger survivability use medium/large images (recommended 512x512+). For small images or icons, keep the message short and use profile=compact plus payload_mode=compact in the API.

Python Example

from truthmark_sdk import TruthMarkClient

# Initialize client
client = TruthMarkClient()

# Encode image with watermark
result = client.encode(
    input_path="original.png",
    message="Copyright 2025 - My Company",
    output_path="watermarked.png"
)

print(f"Quality: {result['psnr']:.2f} dB")
print("Watermarked image saved!")

JavaScript Example

const { TruthMarkClient } = require('@truthmark/sdk');

// Initialize client
const client = new TruthMarkClient();

// Encode image
const result = await client.encode(
  './original.png',
  'Copyright 2025 - My Company'
);

console.log(`Download: ${result.download_url}`);
4

Decode & Verify

Python — Decode

result = client.decode("watermarked.png")

if result['found']:
    print(f"Message: {result['message']}")
    print(f"Confidence: {result['confidence']*100:.1f}%")

Python — Quick Verify

# Lightweight presence check (no payload decryption)
result = client.verify("image.png")

if result['watermarked']:
    print(f"Watermarked! Confidence: {result['confidence']*100:.1f}%")

JavaScript — Decode

const result = await client.decode('./watermarked.png');

if (result.found) {
  console.log(`Message: ${result.message}`);
  console.log(`Confidence: ${result.confidence*100}%`);
}

JavaScript — Quick Verify

const result = await client.verify('./image.png');

if (result.watermarked) {
  console.log(`Confidence: ${result.confidence * 100}%`);
}

You're All Set! 🎉

You've successfully embedded and verified your first watermark.