Skip to main content
POST
Upload a file

Authorizations

Authorization
string
header
required

varg API key (varg_...). Get one at app.varg.ai or run bunx vargai login. App sessions may alternatively send a Supabase JWT.

Headers

Content-Type
string
required
X-Content-Hash
string

sha256 hash of the bytes (with or without the sha256: prefix) for dedup

X-Filename
string

Original filename

Body

application/octet-stream

The body is of type file.

Response

File stored (or deduplicated)

file_id
string
url
string

Stable varg-hosted URL

hash
string | null
size
integer
media_type
string
filename
string | null
title
string | null
subtitle
string | null
metadata
object | null
deduplicated
boolean

true when an existing file with the same content was returned