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-2023

Supported files

Upload the export you already have. Each file becomes one or more tables. Any of the text formats can be gzipped (.gz).

FormatFilesNotes
PostgreSQL dump.sql, .sql.gzDefault COPY format, --inserts and --column-inserts
pg_dump mydb > mydb.sql
MySQL / MariaDB dump.sql, .sql.gzDefault extended inserts, --hex-blob, --complete-insert
mysqldump mydb orders > orders.sql
SQLite.db, .sqlite, .sqlite3, or .sql from .dumpUpload 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.parquetUltra-compact columnar format (70–85% smaller); query types preserved
sov to-parquet orders.csv # or: duckdb -c "COPY orders TO 'orders.parquet'"

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 (cli/sov.py) runs locally on Linux and macOS with Python 3. It automates columnar compression, streaming uploads up to 1 GB, and cryptographic directory packaging.

1. Convert Tabular Data to Parquet (sov to-parquet)

Convert raw CSV, TSV, or JSON into compressed columnar Parquet via DuckDB 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.gz

3. Package & Auto-Split Large Directories (sov pack)

For directories or multi-gigabyte exports, sov pack automatically compresses and splits data at clean newline boundaries into self-contained .spst partitions with SHA-256 Merkle root attestation:

# Pack a directory or huge export (auto-splits without severing lines):
python3 sov.py pack /path/to/data_dir -o my_archive

# Unpack and verify SHA-256 Merkle roots locally:
python3 sov.py unpack my_archive_part_1.spst -o ./restored_data

Model 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.py

Upload 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 DuckDB 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

Limits

Largest file1 GB per file (convert tabular datasets to .parquet with 'sov to-parquet')
Gzipped filesUnpacked up to 1 GB for querying (the stored file stays as uploaded)
Query time15 seconds per query
Rows returned10,000 per query (the response says when it was cut short)
StatementsOne read-only SELECT per request
StorageFree 2 GB · Pro 50 GB · Growth 500 GB · Enterprise 2 TB+ (measured after compression)
QueriesFree 10,000 · Pro 50,000 · Growth 250,000 · Enterprise 1,000,000 a month
API keysFree 1 · Pro 5 · Growth 50

Reaching a limit pauses new uploads or queries; it never deletes files or adds charges.

Errors

400The 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.
401Missing, wrong or revoked API key.
403Not enough storage left on your plan.
404No such file in your account.
409That file_id is already used by another account. Choose a different one.
413The file is larger than 1 GB. Convert tabular datasets to .parquet with 'sov to-parquet' or gzip.
422A stored file failed an integrity check. It is reported, never returned as data; contact us with the file_id.
429Monthly query limit reached. Resets on the 1st, or upgrade.
500Server 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-upload

Store the key in your CI's secret store, never in the repository. 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.
  • Your SQL runs in a sealed, read-only session for that one file, with no access to other files, the server or the network.