REST API
Integrate JPEG Trust into any application over HTTP. Embed, extract, and verify provenance metadata via simple multipart requests.
Base URL
https://16.61.203.65/rest
Interactive API explorers: Swagger UI (try requests in the browser) and ReDoc.
The OpenAPI description is at /rest/openapi.json. A local backend serves the same pages at /docs and /redoc.
Authentication
No authentication is required for local or private deployments. For public-facing instances, configure API key authentication at the reverse proxy level.
Extract metadata
/extract Extract provenance metadata from a JPEG or PNG image. Tries JUMBF JSON first, then falls back to binary manifests.
Multipart form data with one field:
JSON indicator object with declaration, assertions, and manifests.
curl -X POST https://16.61.203.65/rest/extract \
-F "image=@photo.jpg"import requests resp = requests.post( "https://16.61.203.65/rest/extract", files={"image": open("photo.jpg", "rb")}, ) metadata = resp.json()
const form = new FormData(); form.append("image", fileInput.files[0]); const resp = await fetch("https://16.61.203.65/rest/extract", { method: "POST", body: form, }); const metadata = await resp.json();
Example response
{
"@context": ["https://jpeg.org/jpegtrust/"],
"declaration": {
"claim": {
"alg": "sha256",
"claim_generator_info": [{ "name": "Joe's Camera App" }],
"signature_status": "claimSignature.validated",
"content_status": "assertion.dataHash.match"
},
"assertions": {
"cawg.metadata": {
"@context": { "dc": "http://purl.org/dc/elements/1.1/" },
"dc:creator": ["Jane Doe"]
},
"c2pa.actions.v2": {
"actions": [{
"action": "c2pa.created",
"digitalSourceType": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture"
}]
}
}
},
"manifests": [...]
}Embed metadata
/embed Embed provenance metadata into a JPEG or PNG image. Returns the modified image as a binary download.
trainedAlgorithmicMedia)Binary image file (image/jpeg or image/png) with embedded metadata.
curl -X POST https://16.61.203.65/rest/embed \ -F "image=@photo.jpg" \ -F "metadata=@metadata.json" \ -F "digital_source_type=digitalCapture" \ -o embedded.jpg
import requests resp = requests.post( "https://16.61.203.65/rest/embed", files={ "image": open("photo.jpg", "rb"), "metadata": open("metadata.json", "rb"), }, data={"digital_source_type": "digitalCapture"}, ) with open("embedded.jpg", "wb") as f: f.write(resp.content)
Verify image
/verify Verify an image against a trust profile. Returns a scored verification report.
pass (≥ 95%), warning (≥ 70%), or failtrusted, mostly_trusted, or profile_mismatchAI generated, AI modified, not AI-labelled, or unknowncurl -X POST https://16.61.203.65/rest/verify \ -F "image=@signed.jpg" \ -F "profile=@newsroom_profile.yml"
Example response
{
"status": "pass",
"score": 0.9167,
"verdict": "trusted",
"profile": "Newsroom Trust Profile",
"passed_checks": 10,
"total_checks": 11,
"passed": ["signature_chain", "capture_timestamp", ...],
"failed": ["gps_location"],
"ai_label": "not AI-labelled",
"c2pa": {
"detected": true,
"validation": "valid",
"signature_valid": true,
"content_intact": true
}
}Validate record
/validate Run the offline JPEG Trust validator on one image. Returns its full report and the verdict of the selected checks (see the validator docs). GET /validate/config reports whether the server has default trust anchors.
pass, fail or incompleteuploaded, the server default, or nullcurl -X POST https://16.61.203.65/rest/validate \ -F "image=@signed.jpg" \ -F "use-default-anchors=true" \ -F "require-trust=true" -F "require-conformance=true"
Batch operations
Process multiple images in a single request. All batch endpoints accept multiple files via the images form field.
/batch/extractExtract metadata from multiple images. Returns a JSON array with per-image results and a count of how many had metadata.
curl -X POST https://16.61.203.65/rest/batch/extract \ -F "images=@photo1.jpg" \ -F "images=@photo2.jpg" \ -F "images=@photo3.png"
/batch/embedEmbed metadata into multiple images. Returns a ZIP archive containing all embedded images.
/batch/verifyVerify multiple images against one trust profile. Returns per-image results and a summary with pass/warning/fail/error counts.
curl -X POST https://16.61.203.65/rest/batch/verify \ -F "images=@photo1.jpg" \ -F "images=@photo2.jpg" \ -F "profile=@newsroom.yml"
Example response
{
"results": [
{ "filename": "photo1.jpg", "status": "pass", "score": 0.92, "verdict": "trusted" },
{ "filename": "photo2.jpg", "status": "fail", "score": 0.33, "verdict": "profile_mismatch" }
],
"summary": { "total": 2, "passed": 1, "warnings": 0, "failed": 1, "errors": 0 }
}Profiles
Browse available trust profiles and create new ones from templates or custom check lists.
/profiles/templatesReturns a map of template names to their included check IDs.
/profiles/checksList all available verification checks with their ID, label, description, and level (required / optional).
/profiles/createCreate a trust profile. Returns a YAML file.
newsroom, insurance, creator, ai-labelling, or customcurl -X POST https://16.61.203.65/rest/profiles/create \ -F "template=newsroom" \ -F "name=Wire Photo Policy" \ -o profile.yml
IPTC source types
/iptc/source-types List all IPTC digital source types. These slugs declare how an image was created and are used with the digital_source_type parameter on embed endpoints.
Showing a subset. Call the endpoint for the full list of 17 source types.
Error handling
All errors return JSON with a detail field.
{ "detail": "No JPEG Trust metadata found." }Health check
/health Returns {"status": "ok"} when the API is running. Use this for uptime monitoring.