Upload a file
Changed onUpload a file (max 200 MB) as a raw binary body or as multipart/form-data. For a raw body, set Content-Type to the file's media type; any non-JSON Content-Type is treated as the media type. When it's missing or generic, varg sniffs the type from magic bytes. Multipart uploads take the file in the file part (or the first file part) and an optional workspace_id text field.
Send X-Content-Hash: sha256:<hex> to enable deduplication — if your account already has a file with the same content, the existing file is returned instantly (deduplicated: true) without re-uploading. Use GET /files/check?hash= to pre-check before sending bytes.
Request
- Base URL: https://api.varg.ai/v2
- URL: https://api.varg.ai/v2/files
- Auth: HTTP bearer
Headers
sha256 hash of the bytes (with or without the sha256: prefix) for dedup
Original filename
Folder (id or slug) to file the upload into. Wins over a multipart workspace_id field. An unknown folder returns 404 workspace_not_found.
Response
File stored (or deduplicated)
Changes
- info
endpoint added
- info