快速开始
curl -X POST https://api.luxhdr.top/v1/convert/hdr \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_url": "https://your-storage.com/video.mp4",
"platform": "social_media",
"target_nits": 600,
"callback_url": "https://your-api.com/webhook"
}'
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_url": "https://your-storage.com/video.mp4",
"platform": "social_media",
"target_nits": 600,
"callback_url": "https://your-api.com/webhook"
}'
端点
POST /v1/convert/hdr
提交视频进行高端HDR转换。返回job_id用于跟踪。
{ "job_id": "hdr_abc123xyz", "status": "processing", "estimated_completion": "2025-01-15T14:30:00Z" }
GET /v1/jobs/{job_id}
检查任务状态并在完成时获取输出URL。
{ "job_id": "hdr_abc123xyz", "status": "completed", "output_url": "https://cdn.luxhdr.top/output/hdr_abc123xyz.mp4", "metadata": { "bitrate": "15 Mbps", "codec": "HEVC Main10", "color_space": "Rec.2020 ST.2084" } }
GET /v1/platforms
列出所有支持的社交平台及其HDR规格。
[ {"platform": "global_social", "max_nits": 800, "codec": "H.265", "color": "PQ"}, {"platform": "short_form", "max_nits": 600, "codec": "H.265", "color": "PQ"}, {"platform": "vertical_video", "max_nits": 1000, "codec": "H.265/VP9", "color": "PQ"}, {"platform": "regional_network", "max_nits": 800, "codec": "H.265", "color": "HLG/PQ"} ]
认证
所有API请求都需要Bearer令牌。请求API凭证用于您的企业账户。
Authorization: Bearer your_api_key_here
Webhooks
配置回调URL以在转换完成时接收实时通知。
POST https://your-api.com/webhook
{ "event": "job.completed", "job_id": "hdr_abc123xyz", "output_url": "https://cdn.luxhdr.top/output/..." }
{ "event": "job.completed", "job_id": "hdr_abc123xyz", "output_url": "https://cdn.luxhdr.top/output/..." }