Skip to main content
GET
/
screenplay
/
tasks
/
{task_id}
Get Task Status
curl --request GET \
  --url https://mavi-backend.memories.ai/serve/api/v2/screenplay/tasks/{task_id} \
  --header 'Authorization: <api-key>'
{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "ros-sd-20260313-a3f8c2b1",
    "status": "running",
    "progress": {
      "total_episodes": 87,
      "completed_episodes": 12
    }
  },
  "failed": false,
  "success": true
}
This endpoint returns the current status of a screenplay extraction task, including progress information for running tasks and error details for failed tasks.

Code Examples

const BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2";
const API_KEY = "sk-mai-this_a_test_string_please_use_your_generated_key_during_testing";

const taskId = "ros-sd-20260313-a3f8c2b1";
const response = await fetch(`${BASE_URL}/screenplay/tasks/${taskId}`, {
  method: 'GET',
  headers: {
    'Authorization': API_KEY
  }
});

const data = await response.json();
console.log(data);

Path Parameters

ParameterTypeRequiredDescription
task_idstringYesThe screenplay task ID returned from the Submit Task endpoint

Response

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "ros-sd-20260313-a3f8c2b1",
    "status": "running",
    "progress": {
      "total_episodes": 87,
      "completed_episodes": 12
    }
  },
  "failed": false,
  "success": true
}

Response Parameters

ParameterTypeDescription
codeintegerResponse code indicating the result status
msgstringResponse message
data.task_idstringThe screenplay task ID
data.statusstringCurrent task status (see status values below)
data.progressobjectProgress information (only present when status is "running")
data.progress.total_episodesintegerTotal number of episodes to process
data.progress.completed_episodesintegerNumber of episodes completed so far
data.error_codestringError code (only present when status is "failed")
data.error_messagestringDetailed error message (only present when status is "failed")
successbooleanIndicates whether the API call was successful
failedbooleanIndicates whether the API call failed

Task Status Values

StatusDescription
pendingTask has been submitted and is waiting to be processed
runningTask is currently being processed, check progress for details
completedTask has finished successfully, use Download Task Result to get the output files
failedTask has failed, check error_code and error_message for details
cancelledTask has been cancelled via Cancel Task

Notes

  • Poll this endpoint to track progress of long-running tasks
  • When status is "completed", use the Download Task Result endpoint to download the output files
  • The progress field is only available when the task is in "running" status

Authorizations

Authorization
string
header
required

API key for authentication

Path Parameters

task_id
string
required

The screenplay task ID

Example:

"ros-sd-20260313-a3f8c2b1"

Response

200 - application/json

Task status retrieved successfully

code
integer

Response code indicating the result status

Example:

200

msg
string

Response message

Example:

"success"

data
object
success
boolean

Indicates whether the API call was successful

Example:

true

failed
boolean

Indicates whether the API call failed

Example:

false