Documentation
Getting Started
BHK Cloud provides a simple, S3-compatible API for storing and retrieving files. You can interact with BHK Cloud through our REST API, supported SDKs, or third-party tools like rclone.
To get started, you need an API key. You can generate one from your BHK Cloud dashboard under Settings → API Keys.
Authentication
All API requests require a Bearer token in the Authorization header. Your API key acts as the bearer token.
Authorization: Bearer YOUR_API_KEY
Keep your API key secret. Do not expose it in client-side code or public repositories. If you believe your key has been compromised, rotate it immediately from the dashboard.
File Operations
BHK Cloud organizes storage into buckets and objects. Each object is identified by a unique key within its bucket.
- Upload — Send files up to 5 GB per request. For larger files, use multipart upload.
- Download — Retrieve files by key. Supports range requests for partial downloads.
- Delete — Remove objects by key. Deletions are permanent.
- List — Enumerate objects in a bucket with optional prefix filtering and pagination.
See the API Reference for complete endpoint documentation.
SDKs and Libraries
BHK Cloud is compatible with any S3-compatible SDK. We recommend the following:
| Language | Library |
|---|---|
| Python | boto3 |
| JavaScript | @aws-sdk/client-s3 |
| Go | aws-sdk-go-v2 |
| CLI | rclone |
Configure the SDK endpoint to https://s3.bhkcloud.com and use your BHK Cloud API key as the access key.
Rate Limits
API requests are rate-limited to ensure fair usage across all accounts:
| Plan | Requests / minute |
|---|---|
| Free | 60 |
| Pro | 600 |
| Enterprise | Custom |
When you exceed the rate limit, the API returns 429 Too Many Requests. Include a Retry-After header value as your backoff interval.
Error Handling
The API uses standard HTTP status codes. Error responses include a JSON body with a message field describing the issue.
{
"error": "not_found",
"message": "The requested object does not exist.",
"status": 404
}
| Status | Meaning |
|---|---|
400 |
Bad request — check parameters |
401 |
Unauthorized — invalid or missing API key |
403 |
Forbidden — insufficient permissions |
404 |
Not found — resource does not exist |
429 |
Rate limited — back off and retry |
500 |
Server error — contact support |