Open Layo
Browse

Uploads

Complete an upload

On this page
POST/v1/uploads/{upload}/complete

NeedsGenerateNo chargeMCP toolcomplete_upload

Check the uploaded file once its bytes are sent, as the studio checks its own: a photo is decoded, a clip's or a recording's length is read and answered as durationMs. A file that isn't what it declared, can't be read, or is too short is refused. A photo's id then goes in a new influencer's photoIds or an image's imageIds; any file's id can be an item's id in a video's medias. A recording is stored as a 16-bit mono WAV: any other (stereo, another bit depth, an MP3, an M4A) is converted on completion, and the answer's id is then the WAV's, a new one; use it, not the upload's. Completing the upload again within a week answers the same WAV. Completing it again answers the same.

Authorization

  • Authorizationstringrequired

    Bearer then the key, with the generate scope. A Layo API key, from layo.co/api-keys.

Path parameters

  • uploadstring<uuid>required

    The upload's id, from create_upload.

Response

application/json

OK

  • idstring<uuid>required

  • kindenum<string>required

    image (a photo), video (a clip) or audio (a recording).

    Available options: imagevideoaudio

  • mimeTypeenum<string>required

    Available options: image/jpegimage/pngimage/webpvideo/mp4audio/wav

  • byteSizeintegerrequired

    Range: x >= -9007199254740991

  • durationMsinteger

    A clip's or a recording's length in milliseconds, as Layo read it.

    Range: x >= -9007199254740991