ZiB Network Developer API
S3-compatible encrypted storage with Reed-Solomon sharding. Authorization: Bearer <accessKey>:<secretKey>
SDK
/s3/:bucket/:keyapi.zibnetwork.comUpload Object
Upload a file with client-side AES-256-GCM encryption. The backend generates a one-time key + IV, the SDK encrypts in your browser, then sends ciphertext directly to the storage node. Returns a public CDN URL immediately.
Recommended for files up to 50 MB. For larger files use the Multipart Upload flow.
Path Parameters
File (encrypted in browser)
Enter credentials above to run live requests
// Load SDK: <script src="https://app.zibnetwork.com/sdk/zib-sdk.js"></script>
const storage = new ZiBStorage({
accessKey: 'YOUR_ACCESS_KEY',
secretKey: 'YOUR_SECRET_KEY',
});
const result = await storage.upload('my-bucket', 'uploads/file.jpg', file, {
onProgress: ({ stage, progress }) => {
console.log(`${stage}: ${progress}%`);
},
});
console.log('CDN URL:', result.cdn_url);
// => https://cdn.zibnetwork.com/objects/<uuid>How ZiB Encrypted Upload Works
Request Upload URL
PUT /s3/:bucket/:key with no body. Backend returns a presigned node URL + freshly generated AES-256-GCM key + IV.
Encrypt in Browser
The SDK encrypts your file locally using the Web Crypto API. Your plaintext never leaves the browser.
Send to Storage Node
Encrypted bytes are PUT directly to the storage node. The node stores ciphertext only — never plaintext.
Serve via CDN
GET /objects/:file_id — the CDN fetches ciphertext from the node, decrypts it, and streams plaintext to the client.
{
"upload_urls": [
"http://node.zibnetwork.com:9000/upload/TOKEN?file_id=UUID"
],
"file_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"encryption_key": "a3f1...64hex...chars",
"encryption_iv": "b7c2...24hex...chars"
}