---
title: "Write and score video hooks"
method: POST
path: "/v1/ai/hooks"
tags: ["Social posts"]
---

# Write and score video hooks

`POST /v1/ai/hooks`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/ai/hooks`
- Auth: HTTP bearer

Opening lines for a Reel, TikTok or Short from 26 proven hook formulas, in your language: the spoken line, the text on screen at frame 1 (six words or fewer) and why it fits — each scored 0–100 and sorted best first. The score catches weak hooks: a greeting or a preamble, nothing concrete, longer than 3 seconds to say, no stake. It does not predict which strong hook will travel — that is the face, the edit and the audience. Send `hooks` instead of `idea` to score your own lines, free. The winner goes into POST /v1/studio/edit as `hook.text`.

**Billing:** By the tokens / images / seconds the model reports — see GET /v1/ai/models for prices · **Rate limit:** 30/min

## Headers

- `Idempotency-Key` string
- `X-Tag` string

## Request body

- union
  - object
    - `idea` string, required: What the video is about: a sentence, a script or a transcript
    - `count` integer: How many hooks, each from a different formula
    - `hooks` string[]: Score your own spoken lines instead of writing new ones — free, no AI
    - `model` 'auto' | 'gemini-3.8-flash' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-lite': A model id (GET /v1/ai/models) or "auto" — then `quality` decides: fast=gemini-3.1-flash-lite, balanced=gemini-3.5-flash, best=gemini-3.1-pro-preview
    - `details` string: Facts the hooks may use (numbers, names, results). Nothing else is invented: a missing number comes back as {{number}}
    - `quality` 'fast' | 'balanced' | 'best': Which model auto picks: fast (cheapest) · balanced (default) · best (strongest, costs more)
    - `audience` string: Who is watching
    - `language` string: he, en, ar, ru…
    - `platform` 'instagram' | 'tiktok' | 'youtube' | 'facebook' | 'linkedin'
  - object
    - `idea` string: What the video is about: a sentence, a script or a transcript
    - `count` integer: How many hooks, each from a different formula
    - `hooks` string[], required: Score your own spoken lines instead of writing new ones — free, no AI
    - `model` 'auto' | 'gemini-3.8-flash' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-lite': A model id (GET /v1/ai/models) or "auto" — then `quality` decides: fast=gemini-3.1-flash-lite, balanced=gemini-3.5-flash, best=gemini-3.1-pro-preview
    - `details` string: Facts the hooks may use (numbers, names, results). Nothing else is invented: a missing number comes back as {{number}}
    - `quality` 'fast' | 'balanced' | 'best': Which model auto picks: fast (cheapest) · balanced (default) · best (strongest, costs more)
    - `audience` string: Who is watching
    - `language` string: he, en, ar, ru…
    - `platform` 'instagram' | 'tiktok' | 'youtube' | 'facebook' | 'linkedin'

## Response `200`

Completed

- object
  - `id` string: Execution id — stable across internal retries; use it with GET /v1/executions/{id}
  - `status` 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
  - `operation` string
  - `tag` string, nullable: Your X-Tag, if sent
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `output` object: Operation result (see each operation). While a Studio render is processing: `stage` (queued · transcribing · downloading · preparing · cleaning_voice · mixing_audio · rendering · finishing), `phase` (the engine's: download · prepare · voice · audio · encode · qa · upload, or null), `progress` (a percent, 0–100) and `progress_fraction` (0–1), `eta_seconds` (seconds left, never below 0) and `estimate_seconds`
  - `error` string, nullable
  - `usage` object
    - `credits_charged` number, nullable
    - `credits_reserved` number
    - `estimated_credits` number
    - `cost_source` 'provider_reported' | 'calculated' | 'estimated' | 'null', nullable
    - `provider_usage` object, nullable: Normalised consumption, e.g. { VIDEO_SECOND: 22.4 }
  - `balance` object
    - `available` number
    - `reserved` number

## Other responses

- `400`: Invalid input
- `402`: Insufficient credits / project budget
- `404`: Resource not found (or not yours)
- `429`: Rate limited
- `503`: Service temporarily paused

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
