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"
}

Upload a video file directly to AdManage for ad creation. Images and Videos are supported.

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"
}

Parameters

file
file
required

The video file to upload. Supported formats: MP4, MOV, AVI. Maximum size: 100MB.


Upload from URL

Upload a video from a URL to AdManage for ad creation.

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"
}

Parameters

url
string
required

The URL of the video file to upload. Must be publicly accessible and point to a supported video format.


Response Fields

success
boolean

Indicates whether the upload was successful.

url
string

The CDN URL where the uploaded file can be accessed.

filename
string

The final filename of the uploaded file (may include suffix if renamed).

originalName
string

The original filename of the uploaded file.

wasRenamed
boolean

Indicates whether the file was renamed during upload to avoid conflicts.

id
number

Unique identifier for the uploaded file. Use this ID to reference the file in other API calls.

dimensions
object

Detailed information about the file’s dimensions and metadata.

size
number

The size of the uploaded file in bytes.

sizeFormatted
string

Human-readable formatted file size (e.g., “142.11 KB”, “12.00 MB”).


Error Responses

{
  "success": false,
  "error": "FILE_TOO_LARGE",
  "message": "File size exceeds the maximum limit of 100MB",
  "details": {
    "fileSize": 157286400,
    "maxSize": 104857600
  }
}