Skip to main content
When you protect content on Truthlocks, AI automatically analyzes your file to generate metadata — including a suggested title, description, category, and tags. This enriches your protection records and makes them easier to search, share, and verify.

How it works

When you upload a file on the Protect page, Truthlocks sends the file name, type, size, and a preview (for text-based files) or EXIF data (for images) to an AI model. The file itself stays in your browser — only metadata is sent for analysis.
1

File selected

You select or drag a file onto the Protect page.
2

Metadata extracted

Truthlocks reads basic file properties (name, MIME type, size) and, where applicable, extracts EXIF data from images or a text preview from code and document files.
3

AI analysis

The extracted metadata is sent to the AI model, which returns a structured response with category, content type, description, suggested title, tags, and more.
4

Review and edit

AI-generated fields appear as suggestions. You can edit any field before confirming your protection.
AI metadata extraction is automatic and runs in the background as soon as you select a file. You always have the final say — edit or override any suggestion before protecting.

Supported categories

The AI classifies your content into one of the following categories based on file type and content analysis:
CategoryFile types
PhotographyJPEG, PNG, WebP, TIFF, RAW formats
Digital artPSD, AI, SVG, Procreate, HEIC
Source codeJS, TS, Python, Go, Rust, Java, C/C++, and 30+ other languages
DocumentPDF, DOCX, TXT, Markdown, LaTeX
MusicMP3, WAV, FLAC, AAC, MIDI
VideoMP4, MOV, AVI, WebM, MKV
DesignFigma, Sketch, XD files
DataCSV, JSON, XML, SQL, Parquet

Generated metadata fields

The AI produces the following fields for each file:
FieldDescription
categoryContent category (see table above)
content_typeSpecific content type within the category (e.g., “landscape photography”)
suggested_titleA human-readable title based on file name and content
descriptionA short description of what the file contains
tagsRelevant keywords for search and discovery
languageProgramming language (for source code files)
frameworkDetected framework or library (for source code files)
license_hintDetected or suggested license (if identifiable)
subject_matterThe primary subject or topic of the content

Similarity detection

Before minting a protection, Truthlocks checks whether a similar file hash already exists. This prevents duplicate protections and alerts you if the content was previously registered — either by you or by another user. If a match is found, you see a warning with details about the existing protection before proceeding.

Using AI metadata with the API

When calling the mint endpoint, you can include AI-extracted fields to enrich your protection record:
curl -X POST https://api.truthlocks.com/v1/consumer/mint \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "content_hash": "e3b0c44298fc1c149afbf4c8...",
    "title": "Sunset at Big Sur",
    "description": "Landscape photograph taken at Pfeiffer Beach",
    "file_name": "sunset-big-sur.jpg",
    "file_size": 4521984,
    "content_type": "landscape photography",
    "category": "photography",
    "tags": ["landscape", "sunset", "california", "beach"],
    "visibility": "public"
  }'
When using the API, you can skip AI extraction and provide your own metadata directly. The AI extraction feature is available on the web interface and runs automatically.

Privacy

AI metadata extraction follows the same privacy model as the rest of Truthlocks:
  • Your file never leaves your browser. Only the file name, MIME type, size, and a small preview or EXIF data are sent for analysis.
  • No file content is stored by the AI service. Metadata is generated in real time and returned to your browser.
  • You control what ships. Review and edit all AI-generated fields before confirming your protection.

Next steps

Content protection

Full guide to protecting your content with cryptographic attestations.

Embeddable badges

Add verification badges to your website or README.