Endpoints
AI Hook Generator API
Was this page helpful?
Use the free AI hook generator API to draft moderated opening lines at a chosen clickbait level, then carry the selected hook into a script or prompt.
Keyword target: AI hook generator API
The hooks endpoint generates opening lines designed for the first seconds of a short video. Give it one clear topic and a clickbait level from one to five. The writer is free and returns text only, so no media job or credit debit occurs.
- Write a specific topic that names the audience, problem, or desired outcome.
- Choose a restrained clickbait value for educational content or a higher value for a sharper curiosity gap.
- Select a hook and carry it into the script writer, prompt builder, or your own editorial workflow.
Working example
Set REVIRAL_API_KEY only in your server environment, then run this request with values valid for your account.
curl -X POST "https://reviral.ai/api/v1/hooks" \
-H "Authorization: Bearer $REVIRAL_API_KEY" \
-H "Content-Type: application/json" \
--data '{"topic":"Leakproof travel mugs for crowded train commutes","clickbait":3}'Example response
{
"data": {
"ok": true,
"hooks": [
"The five-second bag test every commuter mug should pass",
"Your travel mug has one job before the train arrives"
]
}
}Frequently asked questions
- Does hook generation charge credits?
- No. Hook generation returns text and is free; media generation remains a separate priced request.
- What does the clickbait value control?
- It controls how strongly the lines use curiosity and surprise, from one for restrained wording to five for the strongest treatment.
- Can I turn a hook into a full script?
- Yes. Add the selected line and campaign context to POST /api/v1/script for a complete short-video script.
POST
/api/v1/hooks
Write hooks
Uses the same moderated free hook writer as the product.
Authentication: Bearer API key required
curl -X POST "https://reviral.ai/api/v1/hooks" \
-H "Authorization: Bearer $REVIRAL_API_KEY" \
-H "Content-Type: application/json" \
--data '{"topic":"Leakproof travel mugs for crowded train commutes","clickbait":3}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
| topic | string | Yes | — |
| clickbait | integer (min 1, max 5) | No | — |
Responses
- 200
- Hook response
- 400
- Settings are invalid or a reference field is unsupported
- 401
- Key is missing, revoked, or invalid
- 422
- Settings are invalid or a reference field is unsupported
- 429
- Too many requests
- 500
- Job could not be started
- 502
- Job could not be started
- 503
- Models or rate limiting are temporarily unavailable