> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Hook Generator

> Generate attention-grabbing hooks with multiple variants

# AI Hook Generator

Generate multiple hook variants using different psychological triggers: curiosity, fear, benefit, controversy, and statistics.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flowchart LR
    A[Topic] --> B[AI Hook Generator]
    B --> C[Multi-Style Generation]
    C --> D[Ranked Hooks]
    
    style A fill:#e1f5fe
    style D fill:#c8e6c9
```

## CLI Quickstart

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run ai-hook-generator \
  --input '{"topic": "GPT-5 release", "num_variants": 5}' \
  --json
```

## Use in Your App (SDK)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import sys
sys.path.insert(0, 'agent_recipes/templates/ai-hook-generator')
from tools import generate_hooks, rank_hooks

# Generate hooks
hooks = generate_hooks("GPT-5 just released", num_variants=5)

# Rank by engagement potential
ranked = rank_hooks(hooks["hooks"])
print(f"Best hook: {ranked['best_hook']['text']}")
```

## Input Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "type": "object",
  "properties": {
    "topic": {"type": "string"},
    "num_variants": {"type": "integer", "default": 5},
    "styles": {
      "type": "array",
      "items": {"type": "string"}
    }
  }
}
```

## Output Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "hooks": [
    {
      "text": "Did you know GPT-5 can...",
      "style": "question",
      "score": 0.85
    }
  ],
  "best_hook": {...}
}
```

## Hook Styles

| Style | Description |
| - | - |
| question | Curiosity-driven question |
| bold\_statement | Provocative claim |
| statistic | Data-backed opener |
| story | Personal narrative |
| controversy | Debate-sparking |

## Environment Variables

| Variable | Required | Description |
| - | - | - |
| OPENAI\_API\_KEY | Yes | For hook generation |

## Related Tools

* [AI Script Writer](https://praison.ai/docs/examples/agent-recipes/creator-suite/ai-script-writer.md)
* [AI A/B Hook Tester](https://praison.ai/docs/examples/agent-recipes/creator-suite/ai-ab-hook-tester.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.