Upload a file (image, audio, video) for use in generation requests. Returns a stable URL you can pass to files[].url.
Max file size: 50MB. Pass X-Content-Hash for deduplication — if a file with the same hash already exists, the existing file is returned without re-uploading.
API key from varg.ai/dashboard.
Pass as Authorization: Bearer varg_xxx.
SHA-256 hash of the file content, used for deduplication
The body is of type file.
File uploaded
Unique file identifier
"file_abc123"
Stable URL for the uploaded file
"https://s3.varg.ai/u/user_xxx/abc123.jpg"
SHA-256 hash of the file content
"sha256:abc123def456..."
File size in bytes
102400
Detected MIME type
"image/jpeg"
True if an existing file with the same hash was returned
false