The Data Integrity OmniSeal™ API, built on a REST architecture, is designed for ease of use and predictability. Each API endpoint corresponds to a specific resource or a collection of resources, making the URLs intuitive and easy to understand. For example, register a user uses a URL like:

https://api.purecipher.com/register

The API accepts request bodies in form-encoded format. This means when you need to send data to the server (like creating or updating a resource), you'll encode this data as form fields.

Getting Started Flow

👤

Register

Register as a New User

✉️

Verify OTP

Verify the Received OTP

🔑

Get API Key

Receive the API Key

🚀

Use API

Invoke any Omniseal API

Code Sample

Here's a complete example showing how to register, verify OTP, and use the API to embed an Omniseal

# Step 1: Register a new user
from typing import Dict, Any
from requests import post, Response
import requests
from pathlib import Path


def register_user(email: str, password: str) -> Dict[str, Any]:
    """
    Register a new user with the API.
    """
    response: Response = post(
        "https://api.purecipher.com/register",
        json={
            "email": email,
            "password": password
        }
    )
    return response.json()


def verify_otp(email: str, otp: str) -> Dict[str, Any]:
    """
    Verify OTP and get API key.
    """
    response: Response = post(
        "https://api.purecipher.com/verify",
        json={
            "email": email,
            "otp": otp
        }
    )
    return response.json()


def embed_watermark(api_key: str, cover_image_path: str, secret_image_path: str) -> bytes:
    """
    Embed a watermark using the unified API.
    """
    with open(cover_image_path, 'rb') as cover_file, \
         open(secret_image_path, 'rb') as secret_file:
        
        response = requests.post(
            "https://api.purecipher.com/unified/embed",
            headers={"api_token": api_key},
            files={
                "cover_image": ("cover.png", cover_file, "image/png"),
                "secret_image": ("secret.png", secret_file, "image/png")
            }
        )
        
        if response.status_code == 200:
            return response.content
        else:
            raise Exception(f"Error: {response.status_code} - {response.text}")


# Example usage
if __name__ == "__main__":
    # 1. Register user
    registration = register_user("user@example.com", "secure_password123")
    print("Registration response:", registration)
    
    # 2. Verify OTP (you'll receive this in your email)
    otp_verification = verify_otp("user@example.com", "123456")  # Replace with actual OTP
    api_key = otp_verification["api_key"]
    print("API Key received:", api_key)
    
    # 3. Use the API to embed watermark
    try:
        result = embed_watermark(
            api_key,
            "path/to/cover_image.png",
            "path/to/secret_image.png"
        )
        
        # Save the result
        with open("embedded_image.png", "wb") as f:
            f.write(result)
        print("Successfully embedded watermark and saved as 'embedded_image.png'")
        
    except Exception as e:
        print(f"Error embedding watermark: {e}") 
Test the APIs by embedding and revealing the Data Assets
Drop cover image here or click to upload Supported formats: PNG, JPG, JPEG
Drop secret image here or click to upload Supported formats: PNG, JPG, JPEG