Clipwright

How it works

Seven steps. The first one is the one nobody else does.

  1. Prove the right. Register a grant: ownership, a programme brief, a signed licence, or an open-licence source. We verify it by executing a check, not by reading a form.
  2. Ingest. The source is fetched or uploaded and probed for real duration and dimensions.
  3. Transcribe. Word-level timestamps.
  4. Select moments. Scored on speech density, hook phrases, emphasis keywords, scene-cut proximity, an opening question, and duration fit. Every candidate carries the specific reasons that produced its score. When a free LLM pass (Groq) is reachable, it re-ranks the top candidates from those same disclosed reasons; on any LLM failure or when no key is configured, the transparent heuristic order is used and the job record says so honestly. We never claim predicted views.
  5. Render. Numeric 9:16 crop computed from the real frame size, 1080×1920, captions burned from the actual transcript, thumbnail at the clip midpoint.
  6. Attribute. If the licence requires credit, the attribution string travels with the clip to the scheduler.
  7. Schedule. Hand-off to the Empire Distributor. Publishing is currently disabled — no platform tokens exist, so this records an intent and posts nothing.

API and MCP

Both are behind a bearer key.

POST /api/v1/rights/check   {"source": "..."}        -> ALLOW or 403 REFUSE + reason
POST /api/v1/grants         {"kind","scope","payload"}
POST /api/v1/clips          {"source","top_n"}       -> 403 unless a grant covers it
POST /api/v1/jobs           {"source_file","attestation":{"kind","scope","payload"},"top_n"}
                             -> one call: registers the attestation as a grant, verifies it,
                                then renders. No attestation = 403. A URL as source_file = 400
                                (uploaded files only -- no link ingestion, ever).
GET  /api/v1/clips/<job_id>
POST /api/v1/schedule       {"job_id","platforms"}   -> publish_state NOT_PUBLISHED
POST /mcp                   JSON-RPC: initialize | tools/list | tools/call

MCP tools: clipwright_check_rights, clipwright_register_grant, clipwright_create_clips, clipwright_job_status, clipwright_schedule, clipwright_list_programs.