Picsha AI
Developer Documentation

Media & Entertainment

In the fast-paced world of Media & Entertainment, television networks, streaming platforms, and editorial agencies manage sprawling visual archives containing terabytes of high-definition video, raw photography, and promotional graphics.

Finding a specific cast member across 10,000 un-tagged press junket photos or securely delivering pre-release, watermarked screeners is an operational bottleneck. Picsha AI solves this by natively indexing faces, objects, and scenes at the moment of upload, and dynamically compiling assets into secure streaming formats on the fly.

Core Value Proposition

  1. Facial Indexing & Scene Recognition: Automatically identify and index cast members, public figures, and specific visual contexts without lifting a finger. An editor can simply type "John Doe laughing at the press conference" and instantly retrieve exact matches from the archives.
  2. Resumable Heavy Ingest: Broadcasters generate massive proxy files. Picsha provides a native TUS Resumable Upload protocol out of the box, ensuring that 50GB file uploads can survive network disconnects on remote sets.
  3. Dynamic Watermarking & Format Conversion: Instead of pre-rendering thousands of watermarked screener variants, use Picsha's Edge delivery to dynamically overlay watermarks and convert cumbersome .MOV broadcast files to web-friendly Adaptive Bitrate (ABR) streams.

Integration & Workflows

Below are examples of how backend infrastructure teams orchestrate these heavy M&E workloads using the Picsha AI REST API.

1. Registering Cast Members for Facial Recognition

First, tell the intelligence layer who a specific actor or public figure is. Picsha's AWS Rekognition integration will instantly map this identity across your existing and future media library.

// Register a known face to the organization's face collection
await fetch('https://api.picsha.ai/v1/rekognition/faces/face_id_12345', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer sk_your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: "John Doe" // Going forward, AI searches for 'John Doe' will strictly match this biometric profile
  })
});

2. TUS Resumable Uploads for Massive Video Files

For editors uploading 4K b-roll from a remote location with unstable internet, you can use Picsha's tus endpoints to safely stream chunks directly to the bucket.

import * as tus from "tus-js-client";

// Initiate a resumable upload for a 10GB video file into the Picsha S3 Store
const upload = new tus.Upload(file, {
  endpoint: "https://api.picsha.ai/v1/upload/resumable/",
  retryDelays: [0, 3000, 5000, 10000, 20000], // Auto-resume on failure
  headers: {
    Authorization: "Bearer sk_your_api_key",
  },
  metadata: {
    filename: file.name,
    filetype: file.type
  },
  onSuccess: function() {
    console.log("Download URL:", upload.url);
    // Trigger standard /v1/assets endpoint to finalize the media entry and start AI transcoding
  }
});

upload.start();

3. Delivering Dynamically Watermarked Screeners

When delivering a press kit graphic or a video screenshot, protect your IP by injecting a watermark dynamically onto the asset via URL parameters before it is served to the journalist.

// Original Asset URL
https://api.picsha.ai/v1/assets/asset_123/render

// Safely Distribute: Rendered with a Watermark overlaid in the bottom right corner
https://api.picsha.ai/v1/assets/asset_123/render?wm=watermark_asset_id&wm_pos=southeast&w=1920&fmt=webp

[!TIP] Integrating Webhooks allows your editorial CMS to automatically update its own database the moment Picsha finishes transcoding and indexing a newly uploaded heavy video file. Review our core API routing on the Architecture page.