Analyze channel retention
Analyze the channel's audience retention: which hook signals hold viewers at 30 seconds, the openings that held best, and the steepest mid-video drop-offs with the exact spoken lines. Needs retention curves for at least 5 videos; with fewer, it returns state insufficient_data and charges 0 credits. Costs 1 credit otherwise.
Request examples
curl -sS -X POST "https://hitfactorapp.com/api/v1/retention/channel" \
-H "Content-Type: application/json" \
-H "x-api-key: $HITFACTOR_API_KEY" \
-H "Idempotency-Key: req_2026_001" \
-d '{
"maxVideos": 1
}'const response = await fetch("https://hitfactorapp.com/api/v1/retention/channel", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.HITFACTOR_API_KEY!,
"Idempotency-Key": "req_2026_001",
},
body: JSON.stringify({
"maxVideos": 1
}),
})
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": "analyze_channel_retention",
"arguments": {
"maxVideos": 1,
"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.
maxVideosintegermin: 1max: 25Response (200 OK)
Every successful response wraps the payload in data alongside billing and request metadata in meta.
state = "insufficient_data"3 fields
state"insufficient_data"requiredvideosWithRetentionnumberrequiredminimumRequirednumberrequiredstate = "ready"7 fields
state"ready"requiredvideosWithRetentionnumberrequiredvideosAnalyzednumberrequiredsignalsobjectrequiredShow object fields
videosInCohortnumberrequiredunderpoweredbooleanrequiredcaveatsstring[]requireditemsobject[]requiredShow item fields
keystringrequiredlabelstringrequiredgroupstringrequiredtierstringrequiredbucketstringrequireddirectionstringrequiredindicatesstringrequiredtopOpeningsobject[]requiredShow item fields
videoIdstringrequiredyoutubeIdstringrequiredvideoTitlestringrequiredrelativeRetention30snumberrequiredopeningTextstringrequiredsteepDropsobject[]requiredShow item fields
videoIdstringrequiredyoutubeIdstringrequiredvideoTitlestringrequiredsecondnumberrequiredtimestampstringrequireddeepLinkstringrequiredrelativeRetentionnumberrequireddropMagnitudenumberrequiredspokenLinestringrequirednullabledipsobject[]requiredShow item fields
videoIdstringrequiredyoutubeIdstringrequiredvideoTitlestringrequiredsecondnumberrequiredtimestampstringrequireddeepLinkstringrequiredrelativeRetentionnumberrequireddropMagnitudenumberrequiredspokenLinestringrequirednullableExample 200 response
{
"data": {
"state": "ready",
"videosWithRetention": 0.85,
"videosAnalyzed": 0.85,
"signals": {
"videosInCohort": 0.85,
"underpowered": true,
"caveats": [
null
],
"items": [
null
]
},
"topOpenings": [
{
"videoId": null,
"youtubeId": null,
"videoTitle": null,
"relativeRetention30s": null,
"openingText": null
}
],
"steepDrops": [
{
"videoId": null,
"youtubeId": null,
"videoTitle": null,
"second": null,
"timestamp": null,
"deepLink": null,
"relativeRetention": null,
"dropMagnitude": null,
"spokenLine": null
}
],
"dips": [
{
"videoId": null,
"youtubeId": null,
"videoTitle": null,
"second": null,
"timestamp": null,
"deepLink": null,
"relativeRetention": null,
"dropMagnitude": null,
"spokenLine": null
}
]
},
"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