Skip to main content
POST
Submit Screenplay Task
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 submits an asynchronous screenplay extraction task. It analyzes video episodes and generates structured storyboard data including transcripts, scene breakdowns, and character namelists.
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:
  • $1.00/minute of video (rounded up per episode)
Asset Validation:
  • Each asset must be a video file (not audio or image)
  • Each video must be under 5 minutes in duration
  • Invalid assets will be reported in the error response with specific reasons

Code Examples

Request Body

At least one output format must be enabled: require_json, require_xlsx, or require_merge_xlsx.

Response

Returns task information for the screenplay extraction task.

Response Parameters

Callback Response Parameters

When the task completes or fails, a callback will be sent to your configured webhook URL.

Asset Validation Error Example

If any submitted asset fails validation, the API returns an error with details:

Notes

  • Screenplay extraction is processed asynchronously
  • The task_id returned is from the third-party processing service, use it for status queries, downloads, and cancellation
  • Cost is calculated based on total video duration across all episodes at $1/minute (rounded up)
  • Billing occurs after the task is successfully submitted to the processing service
  • Use Get Task Status to check progress
  • Use Download Task Result to download completed results as a zip file

Authorizations

Authorization
string
header
required

API key for authentication

Body

application/json
mode
enum<string>
required

Extraction mode

Available options:
short_drama,
korean_drama,
prompt_script
Example:

"short_drama"

episodes
object
required

Map of episode number to asset_id

Example:
config
object
required

Configuration options for the extraction task

Response

200 - application/json

Task submitted successfully

code
integer

Response code indicating the result status

Example:

200

msg
string

Response message

Example:

"success"

data
object
success
boolean

Indicates whether the operation was successful

Example:

true

failed
boolean

Indicates whether the operation failed

Example:

false