Integrate AI Story Generator into your applications
The AI Story Generator API allows you to programmatically generate viral scripts, hooks, and content for your applications. All API endpoints return JSON responses.
All API requests require authentication using an API key. Include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
You can generate an API key from your account settings.
https://api.aistorygenerator.com/v1
Generate a complete viral script with hooks, scenes, and more.
POST /generate
| Parameter | Type | Required | Description |
|---|---|---|---|
topic |
string | Yes | The topic for your script |
style |
string | Yes | Script style (e.g., "Emotional Drama", "Comedy") |
language |
string | No | Output language (default: "English") |
curl -X POST https://api.aistorygenerator.com/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"topic": "A dog saves its owner",
"style": "Emotional Drama",
"language": "English"
}'
{
"success": true,
"data": {
"script": "...",
"hooks": ["...", "..."],
"thumbnails": ["...", "..."],
"scenes": ["...", "..."],
"image_prompts": ["...", "..."],
"titles": ["...", "..."],
"description": "...",
"tokens_used": 1500
}
}
API rate limits vary by plan:
| Plan | Requests/Minute | Requests/Day |
|---|---|---|
| Pro | 10 | 500 |
| Unlimited | 30 | Unlimited |
The API returns standard HTTP status codes:
| Code | Description |
|---|---|
200 |
Success |
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Invalid API key |
429 |
Rate limit exceeded |
500 |
Server error |