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.

Base URL: https://lumiq.my/api/v1
All API responses are in JSON format. Video generation runs asynchronously — you get a task_id immediately, then poll for status or receive a webhook callback.

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"
Keep your API key secret. Never expose it in client-side code or public repositories. You can create and revoke keys anytime at lumiq.my/api-dashboard.

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

curl -X POST https://lumiq.my/api/v1/avatar \
  -H "X-API-Key: lmq_YOUR_KEY" \
  -F "video=@source.mp4" \
  -F "photo=@person.jpg" \
  -F "duration=10" \
  -F "ratio=9:16" \
  -F "webhook_url=https://your-server.com/webhook"
import requests

response = requests.post(
    "https://lumiq.my/api/v1/avatar",
    headers={"X-API-Key": "lmq_YOUR_KEY"},
    files={
        "video": open("source.mp4", "rb"),
        "photo": open("person.jpg", "rb"),
    },
    data={
        "duration": "10",
        "ratio": "9:16",
        "webhook_url": "https://your-server.com/webhook"
    }
)
print(response.json())
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');

const form = new FormData();
form.append('video', fs.createReadStream('source.mp4'));
form.append('photo', fs.createReadStream('person.jpg'));
form.append('duration', '10');
form.append('ratio', '9:16');
form.append('webhook_url', 'https://your-server.com/webhook');

const res = await axios.post(
    'https://lumiq.my/api/v1/avatar',
    form,
    { headers: { 'X-API-Key': 'lmq_YOUR_KEY', ...form.getHeaders() }}
);
console.log(res.data);

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.

POST /api/v1/avatar
Multipart form-data request. Returns task_id immediately; video generates in 3–8 minutes.

Request Parameters

ParameterTypeRequiredDescription
videoFileYesSource video file. MP4/MOV, max 100MB, 5–20s for 20s duration.
photoFileYesReference person photo. JPG/PNG, max 10MB.
durationIntegerNoOutput video length: 10, 20, or 30. Default: 10
ratioStringNoAspect ratio: 9:16, 16:9, 1:1, 4:5. Default: 9:16
voice_idStringNoVoice identifier. See available voices in your dashboard. Default: female US voice.
webhook_urlStringNoURL to POST result when generation completes

Credit Cost

DurationCreditsUSD (~)
10s90 cr~$1.50
20s180 cr~$3.00
30s270 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.

POST /api/v1/football
Upload a photo + choose two teams. Fixed 10s 16:9 output. 90 credits per video.

Request Parameters

ParameterTypeRequiredDescription
photoFileYesPerson photo. JPG/PNG, max 10MB.
team_leftStringYesHome team. E.g. "Brazil", "France", "Japan"
team_rightStringYesAway team.
webhook_urlStringNoCallback 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.

GET /api/v1/status/{task_id}

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"
}
Recommended polling interval: every 15 seconds. Tasks typically complete in 3–8 minutes. Maximum wait: 30 minutes.

GET /download/{task_id}

Download the completed video file (MP4).

GET /api/v1/download/{task_id}
Returns the MP4 file directly. Only accessible by the API key owner. Files available for 30 days.
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.

GET /api/v1/account
{
  "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"
}
Your webhook endpoint must return HTTP 200 within 10 seconds. LUMIQ retries up to 3 times with 1s / 2s / 4s backoff.

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 StatusError CodeDescription
400Missing required filesvideo or photo not included
400Invalid durationduration must be 10, 20, or 30
401Missing API keyX-API-Key header not provided
401Invalid API keyKey doesn't exist or is revoked
402Insufficient creditsNot enough credits to generate
404Task not foundtask_id doesn't exist or not yours
429Rate limit exceededMax 30 requests per minute per key
500Internal errorContact support@lumiq.my

Pricing

Credits are purchased once and never expire. No subscription required.

$10
600 Credits
~6 videos (10s)
Buy Now
$100
6,000 Credits
~66 videos (10s)
Buy Now

API Cost per Video

FeatureDurationCreditsUSD (at $10/600cr)
AI Avatar10s90 cr~$1.50
AI Avatar20s180 cr~$3.00
AI Avatar30s270 cr~$4.50
Football Fan10s90 cr~$1.50
Questions? Contact support@lumiq.my · lumiq.my