ozvault home

SDKs · JavaScript · Python · Go

One encryption format.
Every language.

Each SDK encrypts files on your side before they leave your code, then handles uploads, downloads, share links and rotating backups. A file uploaded from Python opens in Go, the CLI or the dashboard.

upload.ts
import { OzVault } from "@ozvault/sdk";

const vault = new OzVault({
  apiKey: process.env.OZVAULT_API_KEY,
});
const key = process.env.OZVAULT_VAULT_KEY; // stays with you

const file = await vault.upload(bucketId, blob, "q3.pdf", key);
const back = await vault.download(file.id, key); // decrypted

Install

Pick your language.

The SDKs are ready to use today. They aren't on npm, PyPI or a Go module proxy yet, so you install them from ozvault.lol. Every download lists its size and SHA-256.

  • JS

    JavaScript & TypeScript

    Node 22+, Deno, Bun and modern browsers

    v0.1.0 · direct download
    npm install https://ozvault.lol/sdk/ozvault-sdk-0.1.0.tgz

    Not on npm yet: install the tarball from ozvault.lol, or use the copy included by `ozvault init`.

    Download (50 KB)@ozvault/sdk
  • Python

    Python 3.9+ (cryptography, httpx)

    v0.1.0 · direct download
    pip install ./ozvault-sdk-python

    Not on PyPI yet: download the SDK and pip-install the folder, or run `ozvault init python` for a project with the SDK included.

  • Go

    Go 1.24+, standard library only

    v0.1.0 · direct download
    go mod edit -replace github.com/ozvault/ozvault-go=./ozvault-sdk-go

    Not published as a Go module yet: download the SDK next to your project and point go.mod at it with a replace directive.

    Download (13 KB)github.com/ozvault/ozvault-go

Share

Share links that don’t trust the server.

The decryption key goes into the link’s #fragment, which browsers never send to a server. With a password, the key inside the link is itself encrypted with that password.

const link = await vault.createShareLink(file.id, key, {
  expiresIn: 7 * 86400,      // a week
  password: "correct horse", // also locks the key
  maxDownloads: 10,
});
console.log(link.url); // https://ozvault.lol/share#token=…
  • Password

    Wraps the key with PBKDF2 + AES-GCM. The server only stores a scrypt hash of a proof.
  • Expiry

    From one minute to 30 days. Expired links stop immediately.
  • Download limit

    Stop after N downloads. Each download is a single-use, ten-minute ticket.
  • Revocable

    List links per file and revoke any of them at once.

Back up

Backups that rotate themselves.

backup() stores a timestamped, encrypted copy and keeps only the newest N. Old ones are deleted for good, so they stop counting against your storage.

// Stored as backups/2026-10-13T20-15-00Z_bot.db
const data = new Blob([await readFile("bot.db")]);
await vault.backup(bucketId, data, key, {
  name: "bot.db",
  keep: 14, // older copies are deleted for good
});

const { blob } = await vault.restoreBackup(bucketId, key, {
  name: "bot.db",
});

Backups are named backups/2026-10-13T20-15-00Z_bot.db, so they sort by time. Other files in the folder are never touched by rotation.

Ready-made setups: the Discord bot backup template, the GitHub Actions workflow and a cron line for the CLI.

Reference

The same methods everywhere.

Names follow each language’s conventions. Errors carry OzVault’s error code, the HTTP status and a request ID.

TaskJavaScriptPythonGo
Upload (encrypted, 4 MiB chunks, resumable)upload()upload()Upload, UploadFile
Download (checksum verified)download()download()Download
List, paginated or alllistObjects(), listAll()list_objects(), iter_objects()ListObjects, Objects
Trash, restore, delete foreverdeleteObject(), restoreObject(), purgeObject()delete_object(), restore_object(), purge_object()DeleteObject, RestoreObject, PurgeObject
Share linkscreateShareLink(), downloadShared()create_share_link(), download_shared()CreateShareLink, DownloadShared
Backups with rotationbackup(), listBackups(), restoreBackup()backup(), list_backups(), restore_backup()Backup, ListBackups, RestoreBackup
Any other endpointrequest()request()Request

Encryption format v1

Open, small and testable.

All SDKs implement the same format and are tested against the same vectors, byte for byte.

FORMAT
object key = HKDF-SHA256(vault key, salt, "ozvault-object-v1")
chunk i    = AES-256-GCM(4 MiB of plaintext)
  nonce    = noncePrefix (8 bytes) ‖ uint32 i
  data     = "ozvault:1:<salt>:<i>:<plainSize>"
checksum   = SHA-256 over all ciphertext

share key  = 0x01 ‖ salt ‖ iv ‖ AES-GCM(PBKDF2-SHA256(password, 600 000), key)
Keep your vault key safe. It never reaches OzVault, so nobody, including us, can recover your files without it. Store a copy somewhere other than the machine that uses it. File names, sizes and timestamps remain visible to the service.

Start with a template.

ozvault init creates a working Next.js, Discord.js or Python project with the SDK already included.