# llms.txt Source: https://docs.sacul.cloud/ai/llms Optimized documentation for AI assistants # llms.txt sCloud provides standardized context files for AI assistants, following the [llms.txt](https://llmstxt.org) specification. These files are designed to help Large Language Models (LLMs) understand our documentation structure and content more effectively. ## Available Files * **[llms.txt](https://docs.sacul.cloud/llms.txt)**: A condensed index of our documentation, suitable for quick context gathering. * **[llms-full.txt](https://docs.sacul.cloud/llms-full.txt)**: A comprehensive concatenation of our documentation, providing full context for deep reasoning tasks. ## Usage You can use these URLs directly in AI tools that support the standard, or provide them as context when asking questions about sCloud. # Model Context Protocol Source: https://docs.sacul.cloud/ai/mcp Connect your AI tools to sCloud # Model Context Protocol (MCP) The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) is a standard for connecting AI assistants to data and tools. sCloud hosts an MCP server to allow compatible AI tools to interact directly with our documentation and services. ## Connection Details * **Server URL**: `https://docs.sacul.cloud/mcp` ## How to use Add this server URL to your MCP-compatible client (such as Claude Desktop, Cursor, or other AI IDEs). Once connected, your AI assistant will be able to access sCloud documentation and context dynamically. # Delete Files Source: https://docs.sacul.cloud/api-reference/delete DELETE https://upload-cdn.sacul.cloud/{bucketName}/{filepath} Delete a file or directory from a bucket. Use this endpoint with caution. Any files deleted cannot be recovered. For security reasons, the maximum number of files that can be deleted in a single request is 100. If you need to delete more files or wipe a bucket, contact us. ## Parameters The name of the bucket. The path to the file or directory to delete. ## Response Indicates if the deletion was successful. Number of files/items deleted. # Introduction Source: https://docs.sacul.cloud/api-reference/introduction Welcome to the sCloud CDN API ## Welcome SCloud CDN offers a powerful API for high-performance content delivery, on-the-fly image processing, and secure file management. ## Base URLs The API is split across two domains to optimize for delivery performance and upload handling: | Purpose | Base URL | Restriction | | -------------------- | -------------------------------- | ------------------------- | | **Basic Endpoint** | `https://cdn.sacul.cloud` | Global access | | **Premium Endpoint** | `https://upload-cdn.sacul.cloud` | Pro subscription required | The `cdn.sacul.cloud` domain has a request body limit of 100MB, suitable for most file uploads. ## Endpoints * [Retrieve Content](/api-reference/retrieve) * [Upload Files](/api-reference/upload) * [Delete Files](/api-reference/delete) ## Authentication All management operations (Upload/Delete) require authentication. Content delivery is generally public unless configured otherwise. ### Methods 1. **Bearer Token (Recommended)** Add the following header to your requests: ```bash theme={null} Authorization: Bearer ``` 2. **Query Parameter** Append the key to your URL: ```bash theme={null} ?apiKey= ``` ## Rate Limits We implement rate limiting to ensure fair usage and stability. The limits differ based on the type of API interaction and your subscription plan. ### User & Developer API Applies to management operations such as bucket creation, editing, and organization management. | Limit | Scope | | :---------------- | :-------------------- | | **1,000 req/min** | Global per-user limit | ### CDN API Applies to content delivery (GET) and file uploads (POST). #### GET Requests * **Global Limit:** Unlimited\* #### POST Requests Upload limits vary by plan: | Plan | Limit | | :----------- | :------------ | | **Free** | 100 req/min | | **Starter** | 300 req/min | | **Pro** | 1,000 req/min | | **Business** | Custom | *\*GET requests are unlimited but subject to standard Anti-DDoS protection and security measures.* Exceeding these limits will result in a `429 Too Many Requests` response. # Generate Presigned URL Source: https://docs.sacul.cloud/api-reference/presigned-urls GET https://cdn.sacul.cloud/{bucketName}/presigned/{filepath} Generate a short-lived URL for direct secure uploads. Presigned URLs allow you to grant temporary access for uploading files directly to your bucket without exposing your API credentials to the client. ## Benefits * **Security**: Your API key remains server-side; the client only receives a temporary URL. * **Performance**: Files transfer directly to the storage, reducing load on your backend. * **Control**: URLs expire automatically and are strictly scoped to the specific file path. ## Query Headers Bearer token for authentication (e.g., `Bearer `). ## Query Parameters The name of the target bucket. The destination path for the file (e.g., `uploads/avatar.jpg`). Expiration time in seconds (max: 3600). ## Response Indicates if the generation was successful. The URL to use for the PUT request. The bucket name. The specific key (path) for the file. Duration in seconds until expiration. ISO timestamp of when the URL will expire. ## Usage Example ### 1. Generate the URL (Server-side) First, your backend requests a presigned URL. ```bash theme={null} curl -X GET https://cdn.sacul.cloud/my-bucket/presigned/users/123/avatar.png?expiresIn=300 \ -H "Authorization: Bearer " ``` ### 2. Upload the File (Client-side) Once your frontend receives the `presignedUrl`, use a `PUT` request to upload the file. ```javascript theme={null} // Example: Uploading a file from an input element const uploadFile = async (file) => { // 1. Fetch the presigned URL from your backend (which calls the sCloud API) const response = await fetch('/api/get-upload-url'); const { presignedUrl } = await response.json(); // 2. Direct upload to sCloud using the presigned URL await fetch(presignedUrl, { method: 'PUT', body: file, headers: { 'Content-Type': file.type // Ensure Content-Type matches the file } }); }; ``` # Retrieve Content Source: https://docs.sacul.cloud/api-reference/retrieve GET https://cdn.sacul.cloud/{bucketName}/{filepath} Retrieve files from a bucket with optional image processing. This endpoint is public by default. You can restrict access in your bucket configuration. ## Parameters The name of the bucket containing the file. The full path to the file including extension (e.g., `images/photo.jpg`). Convert image to a specific format on the fly. Options: `webp`, `jpg`, `png`, `avif`, `gif` Set image quality (1-100). Resize image width (maintains aspect ratio if height not specified). Resize image height (maintains aspect ratio if width not specified). ## Response The file content. File not found. ## Examples ```bash Standard Request theme={null} curl https://cdn.sacul.cloud/my-bucket/images/photo.jpg ``` ```bash Image Transformation theme={null} curl "https://cdn.sacul.cloud/my-bucket/images/photo.jpg?format=webp&width=300" ``` # Upload Files Source: https://docs.sacul.cloud/api-reference/upload POST https://cdn.sacul.cloud/{bucketName}/{filepath} Upload files to a specific path using multipart/form-data. This endpoint only accept `multipart/form-data` requests. Base64 was previously supported but is no longer recommended and will be deprecated in the future. ## Query Headers Bearer token for authentication (e.g., `Bearer `). `multipart/form-data` ## Query Parameters The name of the target bucket. The destination path for the file (e.g., `folder/image.png` or `folder/`). If true, overwrites existing files at the specified path. If true, generates a thumbnail for uploaded images. Thumbnail will be available at `{bucketName}/{filepath}/filename_thumb.webp`. The file content to upload. An array of files to upload. ## Response Indicates if the upload was successful. The public URL of the uploaded file. The file path/key in the bucket. ## Examples ```bash Standard Request theme={null} curl -X POST https://cdn.sacul.cloud/{bucketName}/{filepath} \ -H "Authorization: Bearer " \ -F "file=@/path/to/your/file.jpg" ``` ```bash Batch Request theme={null} curl -X POST https://cdn.sacul.cloud/{bucketName}/{filepath} \ -H "Authorization: Bearer " \ -F "files=@/path/to/your/file1.jpg" \ -F "files=@/path/to/your/file2.jpg" ``` # Fair Use Policy Source: https://docs.sacul.cloud/fair-use-policy Understanding the limits and fair usage of our generic free tiers ## Overview At sCloud, we believe in empowering developers with generous free tiers to build and scale their projects. Our **Free Plan** for the CDN is designed to be accessible, offering "unlimited" GET requests and substantial storage allowances. However, to ensure the stability, performance, and availability of our platform for all users, this Fair Use Policy (FUP) applies to all accounts, particularly those on the Free Plan. ## What Constitutes "Fair Use"? While we do not impose hard caps on CDN traffic (GET requests) for our Free Plan, "unlimited" is not equivalent to "infinite". We monitor usage patterns to identify activity that negatively impacts our infrastructure or other users. ### Prohibited Activities The following behaviors are considered violations of our Fair Use Policy: * **Excessive Request Rates:** Sustaining request rates that resemble Denial of Service (DoS) attacks (e.g., millions of requests per second) or otherwise overwhelming our edge nodes. * **Abnormal Traffic Spikes:** Consistent, unexplained spikes in traffic that are disproportionate to typical web or application usage. * **Storage Abuse:** Utilizing the free storage allowance for purposes other than content delivery (e.g., as a cold storage backup without valid retrieval traffic) or consistently exceeding allocated quotas without upgrading. ## Enforcement Actions If your usage is determined to be in violation of this policy or exceeds what we consider reasonable for a free tier: 1. **Notification:** We will attempt to contact you to discuss your usage and potential solutions. 2. **Upgrade Request:** We may ask you to upgrade to a **Pro** or **Business** plan that is better suited for high-volume or enterprise-scale traffic. 3. **Usage Throttling:** In cases where platform stability is at risk, we may temporarily limit your request rate or bandwidth. 4. **Suspension:** Extreme cases of abuse may result in account suspension to protect our network. Our goal is to support your growth. We only enforce this policy to prevent abuse and ensure a high-quality experience for the entire community. # LB-Phone Source: https://docs.sacul.cloud/integrations/lb-phone Configure LB-Phone or LB-Tablet to use sCloud CDN # LB Scripts Integration To use sCloud with [LB-Phone](https://lbscripts.com/phone) or [LB-Tablet](https://lbscripts.com/tablet), you need to configure the scripts to use custom upload method. If you use both scripts or have multiple FiveM servers, we recommend you to either use different buckets or organize your files in a specific folder. sCloud CDN provides a custom bucket type made for LB-Scripts, when creating your bucket, select `LB-Scripts` as the bucket type. This ensure that your bucket and our API are optimized for LB-Scripts and your players. ## Configuration First, you need to create a bucket if not already done, you can do so by heading to [sCloud CDN Dashboard](https://sacul.cloud/dashboard/services/cdn/buckets/create). Use the following details to configure the custom upload method: * **Upload URL**: `https://cdn.sacul.cloud/YOUR_BUCKET_NAME` * **Field Name**: `file` * **Headers**: * `Authorization`: `Bearer YOUR_API_KEY` Replace `YOUR_BUCKET_NAME` and `YOUR_API_KEY` with your actual sCloud credentials. You can find your API key in your [sCloud CDN Dashboard](https://sacul.cloud/dashboard/services/cdn/buckets). ## LB-Phone Configuration First, open the main LB-Phone configuration file in `lb-phone/config/config.lua` and scroll down to `Config.UploadMethod` to set the following values. ```lua theme={null} Config.UploadMethod.Video = "Custom" Config.UploadMethod.Image = "Custom" Config.UploadMethod.Audio = "Custom" ``` Optionnaly, you can edit the following configuration ```lua theme={null} Config.Video = {} Config.Video.Bitrate = 500 Config.Video.FrameRate = 24 Config.Video.MaxSize = 50 Config.Video.MaxDuration = 120 Config.Image = {} Config.Image.Mime = "image/webp" Config.Image.Quality = 0.95 ``` Next, head to `lb-phone/shared/upload.lua` and replace the default configuration with the following. ```lua theme={null} UploadMethods = { Custom = { Video = { url = "https://cdn.sacul.cloud/YOUR_BUCKET_NAME", field = "file", headers = { ["Authorization"] = "YOUR_API_KEY" }, error = { path = "success", value = false }, success = { path = "url" }, suffix = "", }, Image = { url = "https://cdn.sacul.cloud/YOUR_BUCKET_NAME", field = "file", headers = { ["Authorization"] = "YOUR_API_KEY" }, error = { path = "success", value = false }, success = { path = "url" }, suffix = "", }, Audio = { url = "https://cdn.sacul.cloud/YOUR_BUCKET_NAME", field = "file", headers = { ["Authorization"] = "YOUR_API_KEY" }, error = { path = "success", value = false }, success = { path = "url" }, suffix = "", }, } } ``` And that's it! You have successfully configured LB-Phone to use sCloud CDN. ## LB-Tablet Configuration First, open the main LB-Tablet configuration file in `lb-tablet/config/config.lua` and scroll down to `Config.UploadMethod` to set the following values. ```lua theme={null} Config.UploadMethod.Video = "Custom" Config.UploadMethod.Image = "Custom" Config.UploadMethod.Audio = "Custom" ``` Optionnaly, you can edit the following configuration ```lua theme={null} Config.Video = {} Config.Video.Bitrate = 500 Config.Video.FrameRate = 24 Config.Video.MaxSize = 50 Config.Video.MaxDuration = 120 Config.Image = {} Config.Image.Mime = "image/webp" Config.Image.Quality = 0.95 ``` Next, head to `lb-tablet/config/upload.lua` and replace the default configuration with the following. ```lua theme={null} UploadMethods = { Custom = { Video = { url = "https://cdn.sacul.cloud/YOUR_BUCKET_NAME", field = "file", headers = { ["Authorization"] = "YOUR_API_KEY" }, error = { path = "success", value = false }, success = { path = "url" }, suffix = "", }, Image = { url = "https://cdn.sacul.cloud/YOUR_BUCKET_NAME", field = "file", headers = { ["Authorization"] = "YOUR_API_KEY" }, error = { path = "success", value = false }, success = { path = "url" }, suffix = "", }, Audio = { url = "https://cdn.sacul.cloud/YOUR_BUCKET_NAME", field = "file", headers = { ["Authorization"] = "YOUR_API_KEY" }, error = { path = "success", value = false }, success = { path = "url" }, suffix = "", }, } } ``` And that's it! You have successfully configured LB-Tablet to use sCloud CDN. # ShareX Source: https://docs.sacul.cloud/integrations/sharex Configure ShareX to upload to sCloud # ShareX Integration You can easily configure [ShareX](https://getsharex.com/) to upload images and files directly to your sCloud bucket. ## Configuration 1. Download the custom uploader configuration or create a new one. 2. Replace `YOUR_BUCKET_NAME` with your actual bucket name. 3. Replace `YOUR_API_KEY` with your valid sCloud API key. ### SXCU Configuration Copy the code below and save it as `sCloud.sxcu`, then double-click it to install. ```json theme={null} { "Version": "15.0.0", "Name": "sCloud", "DestinationType": "ImageUploader, FileUploader", "RequestMethod": "POST", "RequestURL": "https://cdn.sacul.cloud/YOUR_BUCKET_NAME", "Headers": { "Authorization": "Bearer YOUR_API_KEY" }, "Body": "MultipartFormData", "FileFormName": "file", "URL": "{json:url}", "ThumbnailURL": "{json:thumbnailUrl}", "ErrorMessage": "{json:error}" } ``` ## Manual Setup If you prefer to configure it manually in ShareX: 1. Open **Destinations > Custom uploader settings**. 2. Click **New**. 3. Set **Name** to `sCloud`. 4. Set **Request URL** to `https://cdn.sacul.cloud/YOUR_BUCKET_NAME`. 5. Set **Method** to `POST`. 6. Add a **Header**: * Name: `Authorization` * Value: `Bearer YOUR_API_KEY` 7. Set **Body** to `Multipart form data`. 8. Set **File form name** to `file`. 9. In the **URL** box (bottom right), enter `{json:url}`. # Introduction Source: https://docs.sacul.cloud/introduction Welcome to sCloud documentation Welcome to **sCloud** documentation! sCloud is a powerful cloud platform designed to help you build, deploy, and scale your applications with ease. ## What is sCloud? sCloud provides a comprehensive suite of cloud services and tools to streamline your development workflow. Whether you're building web applications, APIs, or managing infrastructure, sCloud offers the tools you need to succeed. ## Key Features * **Automatically Scalable Infrastructure**: Our infrastructure is designed to scale automatically based on your needs. * **Developer-Friendly**: Intuitive APIs and comprehensive documentation * **Secure by Default**: Built-in security features to protect your applications * **Cost-Effective**: Pay only for what you use ## Getting Started Ready to get started? Check out our [Quickstart Guide](/quickstart) to deploy your first application in minutes. ## Need Help? * 📧 Email us at [support@sacul.cloud](mailto:support@sacul.cloud) * 💬 Join our community on [Discord](https://discord.gg/wBJamWETxr) * 📚 Browse our documentation (That's what you're doing right now!) # Introduction Source: https://docs.sacul.cloud/sdk/introduction Welcome to the sCloud SDK documentation The sCloud SDK is currently a **Work in Progress**. Interfaces and features are subject to change. ## Overview The sCloud SDK is a TypeScript library designed to provide a tailored developer experience for interacting with [sCloud](https://sacul.cloud) services. It simplifies authentication, request handling, and type safety when integrating sCloud into your applications. ## Features * **TypeScript Support**: Built with TypeScript for full type safety and autocompletion. * **Easy Integration**: Simple authentication and setup. * **Comprehensive Coverage**: Access all sCloud features programmatically. ## Installation The SDK is not yet published to npm. Installation instructions will be available soon. ## Usage Documentation for usage will be added as the SDK matures. Stay tuned for updates!