Table of Contents
RapidHookGen API Documentation
Integrate social media hook, caption & hashtag generation into your applications with our RESTful API.
https://rapidhookgen.com/api/v1
Overview
The RapidHookGen API allows you to programmatically generate engaging social media hooks for your content. Our API is RESTful, uses JSON for requests and responses, and follows standard HTTP status codes.
Key Features
- Generate hooks, captions & hashtags from any topic
- Access premium templates (Pro users only)
- Real-time usage tracking and statistics
- Rate limiting and quota management
- Secure API key authentication
Authentication
All API requests require authentication using an API key. You can manage your API keys from your dashboard.
How to Authenticate
Include your API key in the Authorization header using the Bearer token format:
Authorization: Bearer rh_your_api_key_here
Rate Limits
API requests are rate-limited to ensure fair usage and system stability.
| Account Type | API Requests/Day | Hook Generation Limit |
|---|---|---|
| Free User | 1,000 | 50 hooks/day |
| Pro User | 5,000 | Unlimited |
Rate Limit Headers
Every response includes headers with rate limit information:
X-RateLimit-Limit: Your total daily limitX-RateLimit-Remaining: Requests remaining todayX-RateLimit-Reset: When the limit resets (Unix timestamp)
Endpoints
Generate Hooks
/api/v1/generate
Generate social media hooks for a given topic.
Request Body
{
"topic": "fitness for busy professionals",
"count": 5,
"use_premium": false
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
topic |
string | No | The topic for hook generation (default: "your niche") |
count |
integer | No | Number of hooks to generate (1-50, default: 5) |
use_premium |
boolean | No | Use premium templates (Pro users only) |
Response
{
"success": true,
"data": {
"hooks": [
"🔥 Stop letting busy schedules sabotage your fitness goals...",
"⚡ The 15-minute workout that busy professionals swear by",
"💪 How I stayed fit while working 60-hour weeks (surprising truth)"
],
"topic": "fitness for busy professionals",
"count": 3,
"premium_used": false
},
"usage": {
"hooks_generated": 3,
"remaining_today": 47,
"is_pro": false,
"daily_limit": 50
}
}
User Statistics
/api/v1/user/stats
Get current user statistics and usage information.
Response
{
"success": true,
"data": {
"user": {
"email": "user@example.com",
"is_pro": false,
"created_at": "2023-01-01T00:00:00Z",
"pro_expires_at": null
},
"usage": {
"hooks_used_today": 5,
"remaining_today": 45,
"daily_limit": 50,
"api_requests_today": 10,
"api_limit": 1000
},
"api_key": {
"name": "My Blog Integration",
"created_at": "2023-01-01T00:00:00Z",
"last_used_at": "2023-01-01T12:00:00Z"
}
}
}
Health Check
/api/v1/health
Check API service health (no authentication required).
Response
{
"success": true,
"data": {
"status": "healthy",
"version": "1.0",
"timestamp": "2023-01-01T12:00:00Z"
}
}
Examples
cURL Example
curl -X POST https://rapidhookgen.com/api/v1/generate \
-H "Authorization: Bearer rh_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"topic": "productivity tips for remote workers",
"count": 3
}'
JavaScript Example
const response = await fetch('https://rapidhookgen.com/api/v1/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer rh_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
topic: 'productivity tips for remote workers',
count: 3
})
});
const data = await response.json();
console.log(data.data.hooks);
Python Example
import requests
url = "https://rapidhookgen.com/api/v1/generate"
headers = {
"Authorization": "Bearer rh_your_api_key_here",
"Content-Type": "application/json"
}
data = {
"topic": "productivity tips for remote workers",
"count": 3
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
if result["success"]:
for hook in result["data"]["hooks"]:
print(hook)
Error Handling
The API uses standard HTTP status codes and returns detailed error information.
HTTP Status Codes
| Code | Description |
|---|---|
200 |
Success |
400 |
Bad Request - Invalid request format |
401 |
Unauthorized - Invalid or missing API key |
403 |
Forbidden - Insufficient permissions |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error |
Error Response Format
{
"error": "Rate limit exceeded",
"message": "Daily API request limit exceeded",
"limit": 1000,
"remaining": 0
}
Ready to get started?
Create your API key from the dashboard and start generating hooks!
Need help? Contact us or check out more examples in our documentation.
Ready to Generate Amazing Hooks?