Vercel Serverless REST API
Production endpoints for generating text motion graphics, MP4 videos, and WebP stickers.
● Production v2.0
Endpoint Catalog
All endpoints are globally distributed via Vercel Edge Serverless Functions with CORS enabled.
GET
/api/generate
Generate motion sticker/video via URL parameters
POST
/api/generate
Generate motion sticker/video via JSON request body
GET
/api/presets
Fetch all 80 kinetic motion presets database
GET
/api/health
Uptime & health verification check
Request Parameters (/api/generate)
Pass parameters as URL query strings in GET requests or in the JSON payload body for POST.
| PARAMETER | TYPE | DEFAULT | DESCRIPTION |
|---|---|---|---|
| text | string | "GA USAH..." | Custom text content to animate. Emojis filtered automatically for sharp kinetic sticker rendering. |
| preset | number | string | "random" | Preset ID (0-79) or name (e.g. "Mega Pop", "Soft Pop", "Slide Left"). |
| format | string | "mp4" | Output format: "mp4" (video), "webp" (animated sticker), or "gif". |
| stagger | number | 40 | Delay interval between individual character animations in milliseconds (ms). |
| characterDuration | number | 620 | Character animation entry duration in milliseconds (ms). |
| sweepDelay | number | 100 | Delay before the white sweep specular shader activates (ms). |
| sweepDuration | number | 3000 | White sweep animation travel duration in milliseconds (ms). |
Standard Output Response Schema
JSON response returned on HTTP 200 OK matching production specification.
{ "creator": "VynaaValerie", "status": true, "data": { "id": "CgACAgUAAxkDAAEBy0Zqld8mbVzrFu-6emM5YxyKJhlTWwACSh0AAkPEsFQJ2d44RrxY9j0E", "filename": "ZhohFeGBILTi.mp4", "original_name": "5hbVeQmeQx.mp4", "bytes": 21294, "size": "20.79 KB", "mime": "video/mp4", "extension": "mp4", "url": "https://secure-signed.pages.dev/file/CgACAgUAAxkDAAEBy0Zqld8mbVzrFu-6emM5YxyKJhlTWwACSh0AAkPEsFQJ2d44RrxY9j0E" } }
Code Integration Examples
Ready-to-use snippets in cURL, JavaScript, Python, PHP, and Node.js.
curl -X GET "https://your-domain.vercel.app/api/generate?text=Hello+World&preset=Mega+Pop&format=mp4" \ -H "Accept: application/json"
// JavaScript Fetch Example (Async / Await) const generateMotion = async () => { const query = new URLSearchParams({ text: "GA USAH PURA PURA BAIK", preset: "Mega Pop", format: "mp4" }); const response = await fetch(`https://your-domain.vercel.app/api/generate?${query}`); const result = await response.json(); console.log("Generated Media URL:", result.data.url); };
# Python Requests Example import requests payload = { "text": "GA USAH PURA PURA BAIK", "preset": "Mega Pop", "format": "mp4" } response = requests.get( "https://your-domain.vercel.app/api/generate", params=payload ) data = response.json() print("Media URL:", data["data"]["url"])
<?php // PHP cURL Implementation $url = "https://your-domain.vercel.app/api/generate?text=Hello+World&preset=Mega+Pop&format=mp4"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); echo "Media URL: " . $result['data']['url']; ?>
// Node.js Axios Example const axios = require('axios'); async function run() { const { data } = await axios.get('https://your-domain.vercel.app/api/generate', { params: { text: 'GA USAH PURA PURA BAIK', preset: 'Mega Pop', format: 'mp4' } }); console.log('URL:', data.data.url); } run();