LUMIQ API
The LUMIQ API lets you programmatically generate AI avatar videos and football fan videos at scale. Integrate AI video generation into your product with just a few lines of code.
Authentication
All API requests require an API key passed in the X-API-Key header.
curl https://lumiq.my/api/v1/account \
-H "X-API-Key: lmq_YOUR_API_KEY"
Quick Start
Generate your first AI avatar video in 3 steps:
Step 1 — Get your API key
Visit lumiq.my/api-dashboard and click + Create New Key.
Step 2 — Submit a generation request
Step 3 — Poll for result or receive webhook
# Poll status
curl https://lumiq.my/api/v1/status/TASK_ID \
-H "X-API-Key: lmq_YOUR_KEY"
# Response when ready:
{
"task_id": "a1b2c3d4",
"status": "completed",
"video_url": "https://lumiq.my/api/v1/download/a1b2c3d4"
}
POST /avatar
Generate an AI avatar video by swapping a person's face and voice into a source video.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| video | File | Yes | Source video file. MP4/MOV, max 100MB, 5–20s for 20s duration. |
| photo | File | Yes | Reference person photo. JPG/PNG, max 10MB. |
| duration | Integer | No | Output video length: 10, 20, or 30. Default: 10 |
| ratio | String | No | Aspect ratio: 9:16, 16:9, 1:1, 4:5. Default: 9:16 |
| voice_id | String | No | Voice identifier. See available voices in your dashboard. Default: female US voice. |
| webhook_url | String | No | URL to POST result when generation completes |
Credit Cost
| Duration | Credits | USD (~) |
|---|---|---|
| 10s | 90 cr | ~$1.50 |
| 20s | 180 cr | ~$3.00 |
| 30s | 270 cr | ~$4.50 |
Response
{
"success": true,
"task_id": "a1b2c3d4",
"status": "processing",
"credits_used": 90,
"credits_remaining": 510,
"estimated_time": "3-8 minutes",
"check_status": "https://lumiq.my/api/v1/status/a1b2c3d4"
}
POST /football
Generate a FIFA World Cup 2026 fan video. Places a person in the crowd of a real match scene with AI-generated motion.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| photo | File | Yes | Person photo. JPG/PNG, max 10MB. |
| team_left | String | Yes | Home team. E.g. "Brazil", "France", "Japan" |
| team_right | String | Yes | Away team. |
| webhook_url | String | No | Callback URL on completion. |
Supported Teams (48 total)
United States, Mexico, Canada, France, England, Germany, Spain, Portugal, Italy, Netherlands, Belgium, Croatia, Switzerland, Denmark, Austria, Ukraine, Poland, Sweden, Turkey, Argentina, Brazil, Uruguay, Colombia, Ecuador, Paraguay, Chile, Japan, South Korea, Iran, Australia, Saudi Arabia, Qatar, Uzbekistan, Iraq, UAE, Morocco, Senegal, Tunisia, Algeria, Egypt, Nigeria, Cameroon, Ivory Coast, Mali, Panama, Costa Rica, Jamaica, New Zealand
Response
{
"success": true,
"task_id": "b2c3d4e5",
"status": "processing",
"credits_used": 90,
"credits_remaining": 420,
"estimated_time": "3-5 minutes",
"check_status": "https://lumiq.my/api/v1/status/b2c3d4e5"
}
GET /status/{task_id}
Poll the status of a generation task.
Response — Processing
{
"task_id": "a1b2c3d4",
"status": "processing",
"created_at": "2026-06-14 10:30:00"
}
Response — Completed
{
"task_id": "a1b2c3d4",
"status": "completed",
"created_at": "2026-06-14 10:30:00",
"video_url": "https://lumiq.my/api/v1/download/a1b2c3d4"
}
Response — Failed
{
"task_id": "a1b2c3d4",
"status": "failed",
"created_at": "2026-06-14 10:30:00"
}
GET /download/{task_id}
Download the completed video file (MP4).
curl -O https://lumiq.my/api/v1/download/a1b2c3d4 \
-H "X-API-Key: lmq_YOUR_KEY"
GET /account
Check your account balance and usage statistics.
{
"credits_balance": 1200,
"email": "user@example.com",
"total_api_calls": 47,
"total_credits_spent": 4230
}
Webhook Callbacks
Pass a webhook_url in your request to receive a POST notification when generation completes — no polling needed.
Webhook Payload
POST https://your-server.com/webhook
{
"task_id": "a1b2c3d4",
"status": "completed",
"video_url": "https://lumiq.my/api/v1/download/a1b2c3d4",
"timestamp": "2026-06-14T10:38:22.123456"
}
Failure Payload
{
"task_id": "a1b2c3d4",
"status": "failed",
"error": "Generation failed",
"timestamp": "2026-06-14T10:38:22.123456"
}
Example Webhook Handler (Python)
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def handle_webhook():
data = request.json
task_id = data['task_id']
status = data['status']
if status == 'completed':
video_url = data['video_url']
print(f"Video ready: {video_url}")
elif status == 'failed':
print(f"Task {task_id} failed: {data.get('error')}")
return jsonify({'received': True}), 200
Error Handling
| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | Missing required files | video or photo not included |
| 400 | Invalid duration | duration must be 10, 20, or 30 |
| 401 | Missing API key | X-API-Key header not provided |
| 401 | Invalid API key | Key doesn't exist or is revoked |
| 402 | Insufficient credits | Not enough credits to generate |
| 404 | Task not found | task_id doesn't exist or not yours |
| 429 | Rate limit exceeded | Max 30 requests per minute per key |
| 500 | Internal error | Contact support@lumiq.my |
Pricing
Credits are purchased once and never expire. No subscription required.
API Cost per Video
| Feature | Duration | Credits | USD (at $10/600cr) |
|---|---|---|---|
| AI Avatar | 10s | 90 cr | ~$1.50 |
| AI Avatar | 20s | 180 cr | ~$3.00 |
| AI Avatar | 30s | 270 cr | ~$4.50 |
| Football Fan | 10s | 90 cr | ~$1.50 |