Developer Docs

Platform Integrity API — Developer Guide

Embed upload verification, lineage tracking, and integrity scoring directly into your platform.

Platform Integrity API — Developer Quickstart

Platform Integrity API embeds provenance checks, lineage capture, and anomaly reporting directly into your upload + Trust & Safety flows.

Use this if you are…

  • A marketplace, social network, or media platform verifying every upload before it goes live.
  • Trust & Safety teams that need actionable telemetry, provenance badges, and regulator-ready dockets.

What you get

  • Real-time upload verification (hash/fragment lookups, Accord checks, synthetic detection).
  • Transformation + remix lineage tracking for derivative content.
  • Provenance badges + quarterly dockets for policy, legal, and regulators.
  • Entitlements: high-volume API budget, runtime integrity scoring, Auditor access.

Core APIs & SDK touchpoints

CapabilityREST EndpointSDK hint
Verify single uploadPOST /api/v1/platforms/verify-uploadclient.verifyUpload()
Record transformationPOST /api/v1/platforms/record-transformationclient.recordTransformation()
Batch verifyPOST /api/v1/platforms/batch/verifyclient.batchVerify()
Fetch docket/bundleGET /api/v1/platforms/docket/:platformIdclient.fetchDocket()
Render provenance badgeGET /api/v1/platforms/badge/:hashclient.getProvenanceBadge()

SDK quickstart

import { createSovProvClient } from '@sovprovenance/sdk-js'

const client = createSovProvClient({
  baseUrl: process.env.SOVEREIGN_API_URL!,
  apiKey: process.env.SOVEREIGN_PLATFORM_KEY!,
})

// 1. Verify an upload before publishing
const verification = await client.verifyUpload({
  file: Buffer.from(await fs.promises.readFile('sample.png')),
  metadata: {
    filename: 'sample.png',
    contentType: 'image/png',
    userId: 'user_123',
    platformId: 'platform_nova',
  },
})

if (verification.originSignature.status !== 'verified') {
  throw new Error('Hold upload for manual review')
}

// 2. Record a derivative transformation
await client.recordTransformation({
  parentHash: verification.hashes?.root || 'hash-original',
  newHash: 'hash-thumbnail',
  action: 'thumbnail',
  platformId: 'platform_nova',
  metadata: { width: 640, height: 640 },
})

// 3. Export a docket for Q2 with bundle payload
const docket = await client.fetchDocket({
  platformId: 'platform_nova',
  period: {
    start: '2025-04-01T00:00:00Z',
    end: '2025-06-30T23:59:59Z',
  },
  includeBundle: true,
})

console.log('Integrity stats', docket.summary, docket.bundle?.id)

Implementation notes

  • Map your API key to platform_integrity_api in PRODUCT_SUBSCRIPTIONS or send x-product-id so the SubscriptionContext unlocks higher request ceilings.
  • For large uploads, prefer sending hashes + metadata instead of raw buffers; the Platform service automatically queries the ledger + runtime watchers.
  • Dockets return aggregate stats plus optional JSON bundles suitable for regulators—store them with your compliance documentation.
  • If you need inline badges, call GET /platforms/badge/:hash and inject the response into in-product UI components.