http://video-gen.megavault.in/api
Currently, the API uses IP-based rate limiting. No authentication is required.
http://video-gen.megavault.in/api/generate
{
"highlighted_text": "Your text here",
"width": 1920,
"height": 1080,
"duration": 5,
"fps": 5,
"highlight_color": "#00f7ff",
"text_color": "#ffffff",
"background_color": "#0a0a0a",
"background_style": "solid",
"blur_type": "radial",
"blur_radius": 4.0,
"ai_enabled": true
}
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
highlighted_text | string | Yes | - | Text to highlight in the video |
width | integer | Yes | - | Video width in pixels (256-4096) |
height | integer | Yes | - | Video height in pixels (256-4096) |
duration | integer | Yes | - | Video duration in seconds (1-60) |
fps | integer | No | 5 | Frames per second (1-60) |
highlight_color | string | No | "#00f7ff" | Color of the highlight box (hex) |
text_color | string | No | "#ffffff" | Color of the text (hex) |
background_color | string | No | "#0a0a0a" | Background color (hex) |
background_style | string | No | "solid" | Background style ("solid", "newspaper", or "old_paper") |
blur_type | string | No | "radial" | Type of blur ("gaussian" or "radial") |
blur_radius | float | No | 4.0 | Blur effect radius |
ai_enabled | boolean | No | true | Whether to use AI for text generation |
{
"video_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"message": "Video generation started",
"status_url": "http://video-gen.megavault.in/api/status/550e8400-e29b-41d4-a716-446655440000"
}
http://video-gen.megavault.in/api/status/{video_id}
{
"status": "processing",
"created_at": "2024-05-17T15:39:23.123456",
"video_url": null,
"error": null
}
processing
: Video is being generatedcompleted
: Video is readyfailed
: Generation failedhttp://video-gen.megavault.in/api/video/{video_id}
{
"status": "success",
"video_id": "550e8400-e29b-41d4-a716-446655440000",
"video_url": "http://video-gen.megavault.in/video/550e8400-e29b-41d4-a716-446655440000.mp4"
}
{
"error": "Rate limit exceeded",
"message": "Too many video generations. Please try again later."
}
{
"error": "Missing required field: highlighted_text"
}
{
"status": "error",
"error": "Video not ready or not found"
}
{
"status": "error",
"error": "Server error: [error message]"
}
# Generate video
curl -X POST http://video-gen.megavault.in/api/generate \
-H "Content-Type: application/json" \
-d '{
"highlighted_text": "Hello World",
"width": 1920,
"height": 1080,
"duration": 5
}'
# Check status
curl http://video-gen.megavault.in/api/status/550e8400-e29b-41d4-a716-446655440000
# Get video
curl http://video-gen.megavault.in/api/video/550e8400-e29b-41d4-a716-446655440000
import requests
# Generate video
response = requests.post('http://video-gen.megavault.in/api/generate', json={
'highlighted_text': 'Hello World',
'width': 1920,
'height': 1080,
'duration': 5
})
video_id = response.json()['video_id']
# Check status
status = requests.get(f'http://video-gen.megavault.in/api/status/{video_id}').json()
# Get video URL when ready
if status['status'] == 'completed':
video = requests.get(f'http://video-gen.megavault.in/api/video/{video_id}').json()
print(f"Video URL: {video['video_url']}")