synthesize_hooks
Write original hooks derived from verified viral source evidence. Each hook cites one admitted source: verbatim opening, timestamps, observed views with observation time, known-non-ad proof, and a versioned virality receipt whose caveats say views correlate with, not prove, quality. A lexical novelty guard rejects copied source wording; quality stays unmeasured; never padded. idempotency_key is REQUIRED; a replay returns the exact stored terminal, uncharged. Live posture: GET /health hook_synthesis_enabled; evidence and LLM gates also apply. Errors: unauthorized, invalid_request, idempotency_conflict, conflict, rate_limited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | standard supports up to 5 hooks; deep supports up to 10. | standard |
| topic | Yes | The exact subject the original hooks must address. | |
| locale | No | Explicit country, dialect, script, and code-switch policy. | |
| api_key | No | API key for this call. Omit to fall back to the Authorization: Bearer / X-API-Key request header (streamable-HTTP only), then the VHGENGINE_API_KEY env var (the stdio default). No key resolvable -> unauthorized. | |
| audience | No | Optional intended viewer the hooks are written for. | |
| freshness | No | Maximum source age: any, 7d, 30d, or 90d. | any |
| must_exclude | No | Concepts every admitted source must evidence as absent. | |
| must_include | No | Exact concepts every admitted source must evidence. | |
| viewer_action | No | Optional desired viewer action. | |
| desired_outcome | No | Optional outcome the video promises. | |
| idempotency_key | No | Caller-chosen replay key (any string, unique per intended effect). A repeat call with the SAME key returns the stored result and is NEVER charged twice; the same key with different arguments is an idempotency_conflict. Omit and every call is a fresh, separately charged operation. | |
| requested_count | No | Original hooks to write, 1-10; one per distinct source. | |
| requested_format | Yes | The single speaking format for both sources and hooks. | |
| problem_or_tension | No | Optional problem or tension the hooks should open. | |
| requested_language | No | Requested language: en, fr, es, ar, or ary. | en |
| allowed_opener_states | No | Opener states this caller accepts. Both public states are accepted by default; transcript_grounded sources carry an explicit caveat. | |
| source_requirements_v2 | No | Per-platform source quotas; omission prefers all three. | |
| minimum_distinct_sources | No | Minimum distinct admitted platforms, 1-3. | |
| accepted_source_languages | No | Verified spoken languages eligible as sources. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hooks | No | One entry per original hook: hook_text, format, mechanism (verified facts plus grounded description), source_evidence (verbatim opening, timestamps, observed views with observation time, known-non-ad proof, versioned virality receipt), transformation (source_mechanism, adaptation, passed novelty_guard), confidence (structural basis, quality unmeasured), caveats. | |
| status | No | succeeded (exact count), partial (fewer, with the deficiency stated), insufficient_evidence, capability_unavailable (this deployment's closed default), or failed. Non-delivery statuses charge nothing. | |
| replayed | No | true when an idempotency_key replayed a stored result, so nothing was charged again. The credits_charged below is what the ORIGINAL call cost. | |
| request_id | No | The commission id, echoed on replay. | |
| cost_receipt | No | Reservation and charge; the charge never exceeds the reservation. | |
| deficiencies | No | Why anything fell short, per source where attributable. Codes include hook_synthesis_disabled, evidence_capability_unavailable, llm_transport_unconfigured, novelty_guard_rejected, llm_unavailable. | |
| quality_claim | No | Always 'unmeasured' until a measurement instrument ships. | |
| delivered_count | No | Number of delivered hooks; never padded. | |
| requested_count | No | The requested hook count, at most 10. | |
| evidence_receipt | No | The evidence stage's state: delivered, insufficient, not_dispatched, or failed, with the delivered source count and passthrough deficiencies. | |
| replayed_at_charge | No | true when the replay was detected at the charge boundary rather than up front; either way you are billed exactly once. |