Viral Hooks
[01]Public API

Create hook-led videos programmatically

One endpoint, ten workflows. Pick what you start from — a script, a prompt, a link, or a file — and the API handles visuals, voice-over, captions, music, and viral hook pairing. Every render call costs 10 credits plus generation costs. Estimate any payload for free before running it.

[02]Workflows

What are you starting from?

The workflow field decides everything else — required input, defaults, and which parameters apply.

A script — the exact words to be spoken

An idea or topic — the AI writes the script

A link — article, music, or any web page

A file — audio or video to transform

Selected: Script to video

Example payload
{
  "workflow": "script-to-video",
  "source": {
    "text": "Did you know honey never spoils? Archaeologists found edible honey in Egyptian tombs."
  },
  "hook": {
    "slug": "flip-on-head"
  },
  "webhookUrl": "https://your-server.com/viralhooks/webhook"
}

Render request

cURL
curl -X POST 'https://api.viralhooks.org/v1/render' \
  -H 'Content-Type: application/json' \
  -H 'key: YOUR_API_KEY' \
  -d '{"workflow":"script-to-video","source":{"text":"Did you know honey never spoils? Archaeologists found edible honey in Egyptian tombs."},"hook":{"slug":"flip-on-head"},"webhookUrl":"https://your-server.com/viralhooks/webhook"}'
[03]Quick start

Your first video in 3 steps

1

Get a key

Grab your API key from account settings after sign-in. Send it in the key header on every call.

2

Start a render

POST to /render with your workflow, source payload, and optional webhookUrl.

3

Get the result

Renders are async — your webhook fires when ready, or poll /status with the pid you received.

cURL · POST /render
curl -X POST 'https://api.viralhooks.org/v1/render' \
  -H 'Content-Type: application/json' \
  -H 'key: YOUR_API_KEY' \
  -d '{
    "workflow": "script-to-video",
    "source": { "text": "Did you know honey never spoils?" },
    "hook": { "slug": "flip-on-head" },
    "webhookUrl": "https://your-server.com/viralhooks/webhook"
  }'
cURL · GET /status
curl 'https://api.viralhooks.org/v1/status?pid=YOUR_PID' \
  -H 'key: YOUR_API_KEY'

Pro tip: Configure a video in the dashboard generator, click Get API code, and reuse that exact payload in your integration.

[04]Reference

All workflows at a glance

What each workflow needs () and what you can customize (). Click a row to explore its parameters above.

WorkflowRequiressourcemediavoicecaptionsmusicavatarhookoptionsrender
Script to videosource.text
Avatar to videosource.text + avatar.url
Static background videosource.text or source.url
Prompt to videosource.prompt
Ad generatorsource.prompt or media.provided[]
Article to videosource.url
Music to videosource.url
Audio to videosource.url
Caption videosource.url
Motion transfersource.url + media.provided[] (1 image)
required available not used

Free cost estimate

POST /estimate with the same body as /render — returns credit cost without charging.

cURL · POST /estimate
curl -X POST 'https://api.viralhooks.org/v1/estimate' \
  -H 'Content-Type: application/json' \
  -H 'key: YOUR_API_KEY' \
  -d '{
    "workflow": "prompt-to-video",
    "source": { "prompt": "Street interview reaction, 9:16" },
    "options": { "durationSec": 10 }
  }'