Files

Upload bytes to an upload session

Changed on

Second step of the large-file flow started by POST /files/upload-session. Send the raw file bytes as the request body (not multipart) with the Content-Type from the session. Maximum size is 200 MB. A session accepts one upload and expires after 1 hour.

This endpoint needs no API key: the unguessable session_id is the credential, and CORS allows any origin so browser widgets can call it. The file is registered in your account automatically; registered is false only if registration failed after the bytes were stored, in which case call POST /files/import with public_url.

put/files/upload/{session_id}

Request

  • Base URL: https://api.varg.ai/v2
  • URL: https://api.varg.ai/v2/files/upload/{session_id}
  • Auth: none required

Path parameters

session_idstring required

The session_id from POST /files/upload-session

Response

Bytes stored

okboolean required
public_urlstring required
sizeinteger required

Bytes stored

media_typestring required
file_idstring nullable

Null when registration failed (registered is false)

registeredboolean required

Whether the file was added to your Files

Changes