Generate spoken hooks
Generate 30-second-capped, fact-checked spoken YouTube hooks across requested formats using hook-lora-v2 and channel WPM/messaging defaults, with optional reference exemplars. Costs 3 credits.
Request examples
curl -sS -X POST "https://hitfactorapp.com/api/v1/hooks/generate" \
-H "Content-Type: application/json" \
-H "x-api-key: $HITFACTOR_API_KEY" \
-H "Idempotency-Key: req_2026_001" \
-d '{
"title": "Why Every AI Agent Breaks in Production",
"mainIdea": "example_mainIdea",
"problem": "example_problem",
"payoff": "example_payoff",
"proof": "example_proof"
}'const response = await fetch("https://hitfactorapp.com/api/v1/hooks/generate", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.HITFACTOR_API_KEY!,
"Idempotency-Key": "req_2026_001",
},
body: JSON.stringify({
"title": "Why Every AI Agent Breaks in Production",
"mainIdea": "example_mainIdea",
"problem": "example_problem",
"payoff": "example_payoff",
"proof": "example_proof"
}),
})
const { data, meta } = await response.json()
console.log(data, meta)curl -sS -X POST "https://hitfactorapp.com/api/v1/mcp" \
-H "Content-Type: application/json" \
-H "x-api-key: $HITFACTOR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "generate_hooks",
"arguments": {
"title": "Why Every AI Agent Breaks in Production",
"mainIdea": "example_mainIdea",
"problem": "example_problem",
"payoff": "example_payoff",
"proof": "example_proof",
"requestId": "req_2026_001"
}
}
}'Parameters
Idempotency-KeyheaderstringUnique retry key (up to 255 characters). Replaying the same key and body returns the original response with 0 extra credits charged.
maxLength: 255Request body
Send a JSON object with Content-Type: application/json. Unknown keys are rejected with 400 invalid_input.
titlestringrequiredminLength: 1maxLength: 300mainIdeastringrequiredminLength: 1maxLength: 1500problemstringmaxLength: 1500payoffstringmaxLength: 1500proofstringmaxLength: 2000sectionsstring[]maxItems: 20presenterstringmaxLength: 200formats"reframe-intro" | "four-p" | "if-then"[]minItems: 1maxItems: 3targetWpmintegermin: 60max: 300directionstringmaxLength: 200includeExemplarsbooleandefault: falseResponse (200 OK)
Every successful response wraps the payload in data alongside billing and request metadata in meta.
hooksobject[]requiredShow item fields
format"reframe-intro" | "four-p" | "if-then"requiredtextstringrequiredwordCountintegerrequiredmin: -9007199254740991max: 9007199254740991estimatedSecondsintegerrequiredmin: -9007199254740991max: 9007199254740991passedChecksbooleanrequiredfailures"opening" | "length" | "number" | "name"[]requiredexemplarsobject[]requiredShow item fields
kind"published" | "reference"requiredchannelHandlestringrequirednullabletitlestringrequirednullabletextstringrequiredExample 200 response
{
"data": {
"hooks": [
{
"format": "reframe-intro",
"text": "Every developer builds an AI agent demo in an afternoon, then watches it loop forever in production. Here are the three fixes that actually hold up.",
"wordCount": -9007199254740991,
"estimatedSeconds": -9007199254740991,
"passedChecks": true,
"failures": [
null
]
}
],
"exemplars": [
{
"kind": "published",
"channelHandle": "example_channelHandle",
"title": "Why Every AI Agent Breaks in Production",
"text": "Every developer builds an AI agent demo in an afternoon, then watches it loop forever in production. Here are the three fixes that actually hold up."
}
]
},
"meta": {
"requestId": "req_01j9example0000000000000",
"creditsCharged": 1,
"creditsRemaining": 499,
"replayed": false
}
}Error responses
400invalid_input401Missing or invalid API key402insufficient_credits403insufficient_scope404operation_not_found409channel_sync_pending or idempotency_conflict429rate_limited