Skip to content
Navigation

Cut a person out of a stretch of a video

Cuts the person (or people) out of from–to seconds of a ready video (at most 6 s, snapped to its frames), so a composition can put text behind them: a matte model (MODNet, run by Mosio; it separates the subject and makes no new imagery) writes a transparent VP9 WebM of that stretch, about 20–25 s per second of footage. One at a time per workspace, 20 a day, counted in the media space. The answer comes at once with status: processing; GET /v1/media/{id} lists the cutout with its status and, once ready, a snippet: the base clip of the same video, the text, then the cutout clip at path, in the same box and time. Needs the videos:create permission.

POST
https://app.mosio.me/v1/media/{id}/cutouts

Authorization

  • apiKeyAPI key in headerrequired

Path parameters

  • idstringrequired

    The video's id (upl_…) or its path (assets/media/upl_….mp4).

Request bodyJSONrequired

  • fromnumberrequired

    Where the stretch starts in the video, in seconds.

    minimum: 0
  • tonumberrequired

    Where it ends, in seconds (at most 6 s after from).

Returns

202

The cutout, being made.

JSON
  • idstringrequired
  • media_idstringrequired

    The video it was cut from.

  • pathstringrequired

    The path a composition uses for the cutout clip.

  • fromnumberrequired
  • tonumberrequired
  • duration_secondsnumberrequired
  • statusprocessingorreadyorfailedrequired
  • errorstring | nullrequired

    Why it failed, for the user.

  • poster_urlstring | nullrequired

    A still from the middle, transparent around the person (short-lived URL).

  • widthinteger | nullrequired
  • heightinteger | nullrequired
  • snippetstring | nullrequired

    A ready-to-paste base clip, text and cutout clip for this stretch.

  • created_atstringrequired
    format: date-time

400

The request body is not valid JSON or does not match the schema.
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

401

The API key is missing or not valid.
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

404

No such video or file in this workspace.
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

422

Not a video (cutout_not_video) or the stretch is not valid (cutout_range).
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

429

Another cutout is being made (cutout_busy), or the daily limit is reached (cutout_limit).
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

Type to search…

↑↓ navigate↵ selectEsc close