Upload video files or URLs to AdManage for ad creation
curl -X POST "https://api.admanage.ai/upload" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@/path/to/your/file.mp4"
{ "success": true, "url": "https://media.admanage.ai/company-name/filename.png", "filename": "filename_suffix.png", "originalName": "filename.png", "wasRenamed": true, "dimensions": { "format": "png", "size": 145523, "width": 960, "height": 694, "space": "srgb", "channels": 3, "depth": "uchar", "density": 72, "isProgressive": false, "hasProfile": false, "hasAlpha": false, "exif": { "type": "Buffer", "data": [77, 77, 0, 42, 0, 0, 0, 8, 0, 1, 135, 105, 0, 4, 0, 0, 0, 1, 0, 0, 0, 26, 0, 0, 0, 0, 0, 3, 160, 1, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 160, 2, 0, 4, 0, 0, 0, 1, 0, 0, 3, 192, 160, 3, 0, 4, 0, 0, 0, 1, 0, 0, 2, 182, 0, 0, 0, 0] } }, "size": 145523, "sizeFormatted": "142.11 KB" }
curl -X POST "https://api.admanage.ai/upload/url" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/video.mp4"}'
{ "success": true, "url": "https://media.admanage.ai/admanage.ai/video_sample_xyz123.mp4", "filename": "video_sample_xyz123.mp4", "originalName": "video.mp4", "wasRenamed": true, "id": 11110, "dimensions": { "format": "mp4", "size": 12582912, "width": 1280, "height": 720, "duration": 25.2, "bitrate": 4000000, "framerate": 30 }, "size": 12582912, "sizeFormatted": "12.00 MB" }
Show dimensions properties
{ "success": false, "error": "FILE_TOO_LARGE", "message": "File size exceeds the maximum limit of 100MB", "details": { "fileSize": 157286400, "maxSize": 104857600 } }