Skip to main content
POST
/
serve
/
api
/
v1
/
upload
Upload Video from File
curl --request POST \
  --url https://api.memories.ai/serve/api/v1/upload \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form callback=https://your.app/callback \
  --form unique_id=default \
  --form 'datetime_taken=2025-10-20 11:00:00' \
  --form 'camera_model=Canon EOS 5D' \
  --form latitude=66.66 \
  --form longitude=66.66 \
  --form 'tags[0]=test1' \
  --form 'tags[1]=test2' \
  --form retain_original_video=true \
  --form 'video_transcription_prompt=Focus on the speaker and major scene changes.'
{
  "code": "0000",
  "msg": "success",
  "data": {},
  "success": true,
  "failed": false
}

Prerequisites

  • You’re familiar with the concepts described on the Platform overview.
  • You have created a memories.ai API key.
  • Video and audio formats: h264, h265, vp9, or hevc.
  • Audio track: Required if you intend to use the audio transcription feature.

Host URL

https://api.memories.ai

Endpoint

POST /serve/api/v1/upload
/serve/api/v1/upload

Request Example

import os
import requests

headers = {"Authorization": "<API_KEY>"} 
file_path = "<VIDEO_FILE_PATH>"

files = { 
    "file": (os.path.basename(file_path), open(file_path, 'rb'), "video/mp4") 
} 
data = { 
    "callback": "<CallBack URL>", 
    "unique_id": 'test1020', 
    "datetime_taken": "2025-10-20 11:00:00", 
    "camera_model": "Canon EOS 5D", 
    "latitude": "66.66", 
    "longitude": "66.66", 
    "tags": ["test1", "test2", "test3", "test4", "test5"], 
    "retain_original_video": True, 
    "video_transcription_prompt": '<YOUR_CUSTOMIZED_PROMPT_FOR_VIDEO_FOCUS>' 
}
response = requests.post( 
    "https://api.memories.ai/serve/api/v1/upload", 
    files=files, 
    data=data, 
    headers=headers 
) 
print(response.json())

Callback Notification Payload

If you provide a callback, memories.ai will send a POST request to it once the video has been uploaded or parsed.
{ 
    "videoNo": "VI554046065381212160", 
    "status": "PARSE"
}

Request Parameters

file
file
required
The video file to upload.
unique_id
string
default:"default"
Unique ID for scope.
callback
string
Callback URL for status updates.
datetime_taken
string
Format: YYYY-MM-DD HH:MM:SS
tags
array
List of tags (e.g., [“test1”, “test2”]).
retain_original_video
boolean
default:"true"
Whether to retain the original video file.
video_transcription_prompt
string
Custom prompt for video focus.

Response Example

{ 
    "code": "0000", 
    "msg": "success", 
    "data": { 
        "videoNo": "VI568102998803353600", 
        "videoName": "1be6a69f3c6e49bf986235d68807ab1f", 
        "videoStatus": "UNPARSE", 
        "uploadTime": "1744905509814" 
    }
}

Authorizations

Authorization
string
header
required

Body

multipart/form-data
file
file
required
callback
string<uri>
Example:

"https://your.app/callback"

unique_id
string
default:default
datetime_taken
string
Example:

"2025-10-20 11:00:00"

camera_model
string
Example:

"Canon EOS 5D"

latitude
string
Example:

"66.66"

longitude
string
Example:

"66.66"

tags
string[]
Example:
["test1", "test2"]
retain_original_video
boolean
default:true
video_transcription_prompt
string
Example:

"Focus on the speaker and major scene changes."

Response

200 - application/json

Successful response

code
Example:

"0000"

msg
string
Example:

"success"

data
success
boolean
Example:

true

failed
boolean
Example:

false