Documentation Index Fetch the complete documentation index at: https://docs.raily.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Raily Storage is a fully managed storage solution that provides instant setup with built-in access control, analytics, and monetization. No external storage configuration required.
Features
Zero Configuration Start storing content immediately without setting up external storage.
Global CDN Content delivered through a global CDN for fast access worldwide.
Automatic Backups Regular backups with point-in-time recovery included.
Integrated Analytics Built-in tracking and analytics for all content access.
Uploading Content
import Raily from '@raily/sdk' ;
const raily = new Raily ({
apiKey: process . env . RAILY_API_KEY
});
// Upload content to Raily Storage
const content = await raily . content . create ({
title: "Premium Article" ,
type: "article" ,
storage: {
provider: "raily"
},
file: fileBuffer ,
metadata: {
category: "premium" ,
tags: [ "ai" , "technology" ]
}
});
console . log ( `Content uploaded: ${ content . id } ` );
Accessing Content
// Access content with built-in authorization
const access = await raily . access . check ({
contentId: "cnt_article_123" ,
requesterId: "app_id" ,
context: {
purpose: "inference"
}
});
if ( access . allowed ) {
// Direct access to Raily-hosted content
const response = await fetch ( access . contentUrl , {
headers: {
Authorization: `Bearer ${ access . token } `
}
});
const content = await response . text ();
}
Bulk Upload
// Upload multiple files at once
const files = [
{ title: "Article 1" , file: file1 },
{ title: "Article 2" , file: file2 },
{ title: "Article 3" , file: file3 }
];
const results = await raily . content . bulkCreate ({
storage: { provider: "raily" },
files: files . map ( f => ({
title: f . title ,
file: f . file ,
metadata: { uploadedAt: new Date () }
}))
});
console . log ( `Uploaded ${ results . length } files` );
Storage Limits
Plan Storage Limit Bandwidth CDN Free 1 GB 10 GB/month Yes Pro 100 GB 1 TB/month Yes Enterprise Custom Unlimited Yes
Migration
From S3 to Raily Storage
// Migrate existing S3 content to Raily Storage
const s3Content = await raily . content . list ({
storage: { provider: "s3" }
});
for ( const item of s3Content . items ) {
await raily . content . migrate ({
contentId: item . id ,
to: { provider: "raily" }
});
}
Next Steps
S3 Storage Use Amazon S3 for storage
Content Ingestion Learn more about content management