Documentation
Everything you can do in the dashboard, you can do with the REST API. Base URL: https://api.sovereignbyte.tech
Quick start
1. Sign in to the dashboard with Google and create an API key under API keys. Keys start with sb_live_; we only store a hash, so copy it when it is shown.
2. Send it on every request, either way:
x-api-key: sb_live_...
# or
Authorization: Bearer sb_live_...3. Upload a file, query it, download it:
export SOV_KEY=sb_live_...
curl -H "x-api-key: $SOV_KEY" \
-F file_id=orders-2023 -F file=@orders_2023.sql.gz \
https://api.sovereignbyte.tech/v1/vault/direct-upload
curl -H "x-api-key: $SOV_KEY" \
-d file_id=orders-2023 \
--data-urlencode "sql_query=SELECT status, count(*) AS n FROM orders GROUP BY status" \
https://api.sovereignbyte.tech/v1/vault/pushdown-query
curl -H "x-api-key: $SOV_KEY" -o orders_2023.sql.gz \
https://api.sovereignbyte.tech/v1/vault/download/orders-2023Supported files
Upload the export you already have. Each file becomes one or more tables. Any of the text formats can be gzipped (.gz).
| Format | Files | Notes |
|---|---|---|
| PostgreSQL dump | .sql, .sql.gz | Default COPY format, --inserts and --column-inserts pg_dump mydb > mydb.sql |
| MySQL / MariaDB dump | .sql, .sql.gz | Default extended inserts, --hex-blob, --complete-insert mysqldump mydb orders > orders.sql |
| SQLite | .db, .sqlite, .sqlite3, or .sql from .dump | Upload the database file itself or its dump sqlite3 app.db .dump > app.sql |
| CSV / TSV | .csv, .tsv, .psv, .txt (+ .gz) | With or without a header row; any delimiter psql -c "\copy orders TO 'orders.csv' CSV HEADER" |
| JSON | .json, .jsonl, .ndjson (+ .gz) | A JSON array or one object per line; nested fields become columns mongoexport -c orders -o orders.ndjson |
| Parquet | .parquet | Ultra-compact columnar format (70–85% smaller); query types preserved sov to-parquet orders.csv |
Table names. A CSV, JSON or Parquet file becomes one table named after the file (orders_2023.csv.gz → orders_2023); you can also use data. A dump or SQLite file keeps its own table names.
Column types. In dumps, numbers written without quotes become numbers; quoted values stay exact text, so codes like 000123 keep their zeros. In CSV files an empty value is read as NULL.
Not supported yet: pg_dump custom or directory format (-Fc, -Fd; use plain SQL), .zip and .tar archives, Excel files, and dump values that are function calls other than the ones sqlite3 writes.
Sovereign CLI (sov)
The Sovereign CLI is one Python file, sov.py, that runs on Linux and macOS with Python 3. It uploads files up to 1 GB in parts, packs folders into one archive, and converts tables to Parquet. Download it into any folder:
curl -fsSLO https://sovereignbyte.tech/sov.py && python3 sov.py --help1. Convert Tabular Data to Parquet (sov to-parquet)
Convert raw CSV, TSV, or JSON into compressed columnar Parquet by streaming (yielding 70%–85% size reduction and 10x faster query pushdown):
# Convert local file to ultra-compact .parquet (uses zstd compression)
python3 sov.py to-parquet orders.csv
# Or convert and upload directly to Sovereign Cloud:
python3 sov.py to-parquet orders.csv --api-key sb_live_...2. Direct Upload from Terminal (sov upload)
Upload any dataset up to 1 GB. Adding --to-parquet automatically converts tabular files before uploading:
export SOVEREIGN_API_KEY=sb_live_...
# Upload and auto-convert tabular datasets:
python3 sov.py upload dataset.csv --to-parquet
# Upload any existing archive or database dump:
python3 sov.py upload database_backup.sql.gz3. Pack a folder into one archive (sov pack)
sov pack compresses a folder or file into one .spst archive with a Merkle root over its blocks, using little memory however big the input. Uploads go in 8 MB parts that our server joins back into one file, so nothing is split on your side. Each file can be up to 1 GB after compression today.
# Pack a folder into one archive (add --api-key to upload it too):
python3 sov.py pack /path/to/data_dir -o my_archive
# Unpack it, checking the Merkle root first:
python3 sov.py unpack my_archive.spst -o ./restored_dataModel Context Protocol (MCP)
Connect Claude Desktop, Cursor, Antigravity, and VS Code directly to your Sovereign Cloud Vault using our official MCP Server (mcp/sovereign_mcp_server.py).
AI agents gain the ability to query multi-gigabyte datasets via SQL pushdown, inspect schemas, auto-convert tabular datasets to Parquet, and upload/download vault files without manual dashboard interaction.
Claude Desktop Setup
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"sovereign-cloud": {
"command": "python3",
"args": ["/absolute/path/to/sovereign-aws-cloud-enterprise/mcp/sovereign_mcp_server.py"],
"env": {
"SOVEREIGN_API_KEY": "sb_live_..."
}
}
}
}Cursor & Windsurf Setup
In Cursor Settings → Features → MCP Servers, add a new server:
Name: sovereign-cloud
Type: command
Command: python3 /absolute/path/to/sovereign_mcp_server.pyUpload a file
POST /v1/vault/direct-upload (multipart form) with file and file_id, a name you choose (letters, digits, . _ -). Uploading again with the same file_id replaces the file.
After upload we compress the file losslessly in the background. Downloads always return the bytes you uploaded.
Run SQL
POST /v1/vault/pushdown-query with form fields file_id and sql_query. Queries use PostgreSQL-style SQL: joins between the tables of one file, CTEs, window functions, regular expressions and JSON functions all work.
{
"status": "success",
"latency_ms": 6,
"truncated": false,
"tables": ["orders", "customers"],
"results": [{"status": "PAID", "n": 1820}, {"status": "REFUNDED", "n": 41}]
}GET /v1/vault/tables?vault_file_id=orders-2023 lists a file's tables without running a query. The first query on a new file takes longer while we prepare it; later queries are fast.
List, download, delete
GET /v1/vault/files # your files, sizes and status
GET /v1/vault/download/{file_id} # the original bytes
DELETE /v1/vault/files/{file_id} # removes the file and every copy we made
GET /v1/vault/quota # storage used and plan limit
GET /v1/vault/files/{file_id}/tables # tables, columns, types, row counts (not a search)
GET /v1/vault/files/{file_id}/tables/{t}/preview # first rows of one table, up to 50 (not a search)A file locked with a keep-until date can't be deleted or replaced before that date (409).
Export results
POST /v1/vault/export-query takes the same form fields as Run SQL and streams up to 1,000,000 rows as a CSV that opens in Excel. Optional max_rows sets a lower cap. An export counts as one search.
curl -H "x-api-key: $SOV_KEY" -o paid.csv \
-d file_id=orders-2023 \
--data-urlencode "sql_query=SELECT * FROM orders WHERE status = 'PAID'" \
https://api.sovereignbyte.tech/v1/vault/export-queryIntegrity receipt
After each upload our server measures the SHA-256 of the file you get back when you download it, from the stored bytes, not from what your browser sent. The receipt shows that fingerprint, when it was first measured and the last check's result.
GET /v1/vault/files/{file_id}/receipt # the receipt as JSON
POST /v1/vault/files/{file_id}/verify # re-read the stored file now and re-check it (at most once a minute)check.status is VERIFIED, MISMATCH (the stored bytes changed), UNREADABLE (the stored file can't be decoded), FAILED (the check couldn't run), PENDING or NOT_CHECKED.
Check it yourself without trusting us: download the file and compare.
shasum -a 256 orders_2023.sql.gz # macOS / Linux
certutil -hashfile orders_2023.sql.gz SHA256 # WindowsKeep-until lock
PUT /v1/vault/files/{file_id}/retention with form field retain_until=YYYY-MM-DD. Until that date the file can't be deleted or replaced, through the dashboard or the API. The date can be moved later, never earlier.
curl -X PUT -H "x-api-key: $SOV_KEY" \
-F retain_until=2034-03-31 \
https://api.sovereignbyte.tech/v1/vault/files/ledger-fy2025/retentionThe lock is enforced by our service, not by the storage layer underneath it.
Activity log
Every upload, download, delete, lock, re-check, search, export and API-key change is recorded with who did it (their email, or "API key"), when, the IP address and the file. Free plans keep 30 days; paid plans keep a year.
GET /v1/activity?limit=50 # newest first; pass next_cursor as cursor= for the next page
GET /v1/activity?event=download # one kind: upload, download, delete, lock, verify,
# search, export, api_key.create, api_key.revoke
GET /v1/activity/export # the whole retained log as CSVAPI keys
Create and revoke keys in the dashboard under API keys; for safety, key changes need a dashboard sign-in, not an API key. A key is shown once when created. Revoking it stops it working immediately. Your plan sets how many active keys you can have (see Limits).
Limits
| Largest file | 1 GB per file (convert tabular datasets to .parquet with 'sov to-parquet') |
| Gzipped files | Unpacked up to 1 GB for querying (the stored file stays as uploaded) |
| Query time | 15 seconds per query |
| Rows returned | 10,000 per query (the response says when it was cut short) |
| Statements | One read-only SELECT per request |
| Rows exported | 1,000,000 per export |
By plan
| Storage | Free 2 GB · Starter 20 GB · Pro 100 GB · Business 500 GB · Enterprise per contract (measured after compression) |
| Searches a month | Free 10,000 · Starter 25,000 · Pro 1,00,000 · Business 5,00,000 |
| API keys | Free 1 · Starter 3 · Pro 10 · Business 50 |
| Activity log kept | Free 30 days · paid plans 1 year |
| Price | Starter ₹1,999/mo · Pro ₹4,999/mo · Business ₹11,999/mo · yearly = 10 months |
Reaching a limit pauses new uploads or queries; it never deletes files or adds charges. See pricing for plans.
Errors
| 400 | The SQL or file can't be used: not a single SELECT, unsupported file type, a dump value we can't read safely. The message says which. |
| 401 | Missing, wrong or revoked API key. |
| 403 | Not enough storage left on your plan. |
| 404 | No such file in your account. |
| 409 | The request conflicts with the file's state: the file_id belongs to another account, the file is locked until its keep-until date, the stored file can't be read back, or its tables are still being prepared. The message says which. |
| 413 | The file is larger than 1 GB. Convert tabular datasets to .parquet with 'sov to-parquet' or gzip. |
| 422 | A stored file failed an integrity check during a search or export. It is reported, never returned as data; contact us with the file_id. |
| 429 | Monthly query limit reached. Resets on the 1st, or upgrade. |
| 500 | Server error. The message includes a reference; send it to us. |
Errors return JSON: {"detail": "..."}. Is the service itself up? See the status page or GET /v1/status.
Nightly backups
A cron job or CI step that archives last night's dump, with the date in the file_id:
# PostgreSQL
pg_dump "$DATABASE_URL" | gzip > db.sql.gz
# or MySQL
mysqldump --single-transaction mydb | gzip > db.sql.gz
curl -fsS -H "x-api-key: $SOV_KEY" \
-F file_id=db-$(date +%F) -F [email protected] \
https://api.sovereignbyte.tech/v1/vault/direct-uploadStore the key in your CI's secret store, never in the repository. Add a keep-until lock after each upload if your auditor needs the backup kept for a set period. For files above 1 GB, split dumps by table (pg_dump -t, mysqldump mydb table), bundle directories with sov pack, or convert tabular data with sov to-parquet.
How we keep files intact
- Files are stored in Amazon S3 in AWS Mumbai (ap-south-1), encrypted at rest.
- Before a stored file is replaced with a smaller compressed copy, the copy is decoded and its SHA-256 and size compared with the original. If anything differs, the original stays.
- Archives made with our desktop app (.spst v2) carry SHA-256 hashes for each block, checked when they are read. A mismatch returns an error, never data.
- After upload, our server measures each file's SHA-256 from the stored bytes and records it on the integrity receipt. You can re-check it at any time.
- Your SQL runs in a sealed, read-only session for that one file, with no access to other files, the server or the network.