Skip to main content
POST
Edit Video
Product: Visual Agents Use case: Managed endpoints powering Memories.ai’s open-source video search and editing agents (queries, video clipping/editing, screenplay extraction) Host: https://mavi-backend.memories.ai/serve/api/v2 Auth: Authorization: sk-mavi-... (no Bearer prefix)
This endpoint allows you to edit videos by combining multiple assets with custom orientation and AI-guided editing instructions.
This is an async endpoint. You must configure a webhook URL in Webhooks Settings before calling this endpoint, otherwise you will not receive the processing results. See Webhooks Configuration Guide for details.
Pricing:
  • $0.15/min of video

Code Examples

Request Body

  • Prompt language: English is recommended for best editing results. Other languages may work but are not guaranteed.
  • Prompt length: Keep prompts under 500 characters for optimal performance.
  • Output duration: The output video duration is determined by the AI based on the input assets and prompt — it cannot be manually specified.

Response

Returns task information for the video editing operation.

Response Parameters

Callback Response Parameters

When the video editing is complete, a callback will be sent to your configured webhook URL.

Understanding the Callback Response

The callback response contains metadata about the final edited video created from combining and editing the input assets. Response Structure:
How to access the data:
  • Edited video asset ID: callback_response.data.asset_id
  • Video file size: callback_response.data.file_size
  • Video filename: callback_response.data.original_filename
  • Upload status: callback_response.data.upload_status
  • Creation timestamp: callback_response.data.create_time
  • Task ID: callback_response.task_id

Prompt Examples

The user_prompt parameter guides the AI editing process. Here are some effective prompt examples:

Notes

  • Video editing is processed asynchronously using AI
  • Returns a task_id that can be used to track the editing progress
  • Use the task_id to query the status and results of video editing
  • Supports combining multiple video assets
  • Orientation options: landscape (16:9) or portrait (9:16)
  • User prompt guides AI editing decisions — be specific about the desired style, pacing, and transitions
  • Processing time varies based on complexity and video length

Authorizations

Authorization
string
header
required

Body

application/json
asset_ids
string[]
required

Array of video asset IDs to combine and edit

Example:
orientation
enum<string>
required

Output video orientation

Available options:
landscape,
portrait
Example:

"portrait"

user_prompt
string
required

AI editing instructions describing desired output

Example:

"Create a dynamic montage with smooth transitions"

Response

200 - application/json

Video editing initiated successfully

code
string

Response code indicating the result status

Example:

200

msg
string

Response message describing the operation result

Example:

"success"

data
object

Response data object containing task information

success
boolean

Indicates whether the operation was successful

Example:

true

failed
boolean

Indicates whether the operation failed

Example:

false