Object Storage
The object storage endpoints handle operations on objects stored in buckets, providing core functionality for managing files and data in SmartBuckets. This service enables direct interaction with stored objects through simple CRUD operations.
POST /v1/delete_object
Delete a file from a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to delete from. The key is the path to the object in the bucket.
Schema Reference
Request Body
key (string) Required
Details
Description
Object key/path to delete
Example
my-keybucketLocation (object) Required
Details
Description
The buckets to search. If provided, the search will only return results from these buckets
Example
{ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" }}import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const bucket = await client.bucket.delete({ bucketLocation: { bucket: { name: 'my-smartbucket', version: '01jxanr45haeswhay4n0q8340y', application_name: 'my-app' }, }, key: 'my-key',});
console.log(bucket);from raindrop import Raindrop
client = Raindrop()bucket = client.bucket.delete( bucket_location={ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app", } }, key="my-key",)print(bucket)package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) bucket, err := client.Bucket.Delete(context.TODO(), raindrop.BucketDeleteParams{ BucketLocation: raindrop.BucketLocatorParam{Bucket: raindrop.LiquidmetalV1alpha1BucketNameParam{ApplicationName: "my-app", Name: "my-bucket", Version: "01jtryx2f2f61ryk06vd8mr91p"}}, Key: "my-key", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", bucket)}package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.bucket.BucketDeleteParams;import com.raindrop.api.models.bucket.BucketDeleteResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
BucketDeleteParams params = BucketDeleteParams.builder() .bucketLocation(JsonValue.from(Map.of( "bucket", Map.of( "name", "my-smartbucket", "version", "01jxanr45haeswhay4n0q8340y", "application_name", "my-app" ) ))) .key("my-key") .build(); BucketDeleteResponse bucket = client.bucket().delete(params); }}raindrop object delete dog1.pdf --bucket video-demoscurl -X POST "https://api.raindrop.run/v1/delete_object" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "key": "my-key", "bucket_location": { "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" } }}'Response Examples
{}POST /v1/get_object
Download a file from a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to download from. The key is the path to the object in the bucket.
Schema Reference
Request Body
key (string) Required
Details
Description
Object key/path to download
Example
my-keybucketLocation (object) Required
Details
Description
The buckets to search. If provided, the search will only return results from these buckets
Example
{ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" }}content (string)
Details
Description
No specific comments in original for these fields directly, but they were part of the original GetObjectResponse.
contentType (string)
Details
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const bucket = await client.bucket.get({ bucketLocation: { bucket: { name: 'my-smartbucket', version: '01jxanr45haeswhay4n0q8340y', application_name: 'my-app' }, }, key: 'my-key',});
console.log(bucket.content);from raindrop import Raindrop
client = Raindrop()bucket = client.bucket.get( bucket_location={ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app", } }, key="my-key",)print(bucket.content)package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) bucket, err := client.Bucket.Get(context.TODO(), raindrop.BucketGetParams{ BucketLocation: raindrop.BucketLocatorParam{Bucket: raindrop.LiquidmetalV1alpha1BucketNameParam{ApplicationName: "my-app", Name: "my-bucket", Version: "01jtryx2f2f61ryk06vd8mr91p"}}, Key: "my-key", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", bucket.Content)}package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.bucket.BucketGetParams;import com.raindrop.api.models.bucket.BucketGetResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
BucketGetParams params = BucketGetParams.builder() .bucketLocation(JsonValue.from(Map.of( "bucket", Map.of( "name", "my-smartbucket", "version", "01jxanr45haeswhay4n0q8340y", "application_name", "my-app" ) ))) .key("my-key") .build(); BucketGetResponse bucket = client.bucket().get(params); }}# Download a file from a bucketnpx raindrop object get my-key -b my-bucket
# Download to specific output filenpx raindrop object get my-key output.txt -b my-bucket
# Output to stdoutnpx raindrop object get my-key -b my-bucket --format stdoutcurl -X POST "https://api.raindrop.run/v1/get_object" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "key": "my-key", "bucket_location": { "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" } }}'Response Examples
{ "content": "example", "contentType": "example"}POST /v1/list_objects
List all objects in a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to list objects from.
Schema Reference
Request Body
bucketLocation (object) Required
Details
Description
The buckets to search. If provided, the search will only return results from these buckets
Example
{ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" }}prefix (string(nullable))
Details
Description
Optional prefix to filter object keys (e.g., “documents/” to only list objects in documents folder)
Example
documents/objects (array) Required
Details
Description
List of objects in the bucket with their metadata.
Example
[ { "key": "08036c5a50a93da84c5c45ba468c58159d75281e.pdf", "size": "401107", "contentType": "application/pdf", "lastModified": "2025-05-05T18:36:43.029Z" }, { "key": "0a29925ccc5e6299e132a73325956a3abef6dd26.pdf", "size": "57173", "contentType": "application/pdf", "lastModified": "2025-05-05T18:36:43.985Z" }, { "key": "0e21835a42a6df2405496f62647058ff855743c1.pdf", "size": "1223197", "contentType": "application/pdf", "lastModified": "2025-05-05T18:36:45.362Z" }]import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const buckets = await client.bucket.list({ bucketLocation: { bucket: { name: 'my-smartbucket', version: '01jxanr45haeswhay4n0q8340y', application_name: 'my-app' }, },});
console.log(buckets.objects);from raindrop import Raindrop
client = Raindrop()buckets = client.bucket.list( bucket_location={ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app", } },)print(buckets.objects)package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) buckets, err := client.Bucket.List(context.TODO(), raindrop.BucketListParams{ BucketLocation: raindrop.BucketLocatorParam{Bucket: raindrop.LiquidmetalV1alpha1BucketNameParam{ApplicationName: "my-app", Name: "my-bucket", Version: "01jtryx2f2f61ryk06vd8mr91p"}}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", buckets.Objects)}package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.bucket.BucketListParams;import com.raindrop.api.models.bucket.BucketListResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
BucketListParams params = BucketListParams.builder() .bucketLocation(JsonValue.from(Map.of( "bucket", Map.of( "name", "my-smartbucket", "version", "01jxanr45haeswhay4n0q8340y", "application_name", "my-app" ) ))) .build(); BucketListResponse buckets = client.bucket().list(params); }}# List all objects in a bucketnpx raindrop object list -b my-bucket
# List objects in JSON formatnpx raindrop object list -b my-bucket --output json
# List objects in table formatnpx raindrop object list -b my-bucket --output tablecurl -X POST "https://api.raindrop.run/v1/list_objects" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "bucket_location": { "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" } }}'Response Examples
{ "objects": [ { "key": "08036c5a50a93da84c5c45ba468c58159d75281e.pdf", "size": "401107", "contentType": "application/pdf", "lastModified": "2025-05-05T18:36:43.029Z" }, { "key": "0a29925ccc5e6299e132a73325956a3abef6dd26.pdf", "size": "57173", "contentType": "application/pdf", "lastModified": "2025-05-05T18:36:43.985Z" }, { "key": "0e21835a42a6df2405496f62647058ff855743c1.pdf", "size": "1223197", "contentType": "application/pdf", "lastModified": "2025-05-05T18:36:45.362Z" } ]}POST /v1/put_object
Upload a file to a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to upload to. The key is the path to the object in the bucket.
Schema Reference
Request Body
key (string) Required
Details
Description
Object key/path in the bucket
Example
my-keycontent (string) Required
Details
Description
Binary content of the object
contentType (string) Required
Details
Description
MIME type of the object
Example
application/pdfbucketLocation (object) Required
Details
Description
The buckets to search. If provided, the search will only return results from these buckets
Example
{ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" }}bucket (object)
Details
Description
Information about the bucket where the object was uploaded
Example
{ "moduleId": "01jt3vs2nyt2xwk2f54x2bkn84"}key (string)
Details
Description
Key/path of the uploaded object
Example
test-object.txtimport Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const response = await client.bucket.put({ bucketLocation: { bucket: { name: 'my-smartbucket', version: '01jxanr45haeswhay4n0q8340y', application_name: 'my-app' }, }, content: 'U3RhaW5sZXNzIHJvY2tz', contentType: 'application/pdf', key: 'my-key',});
console.log(response.bucket);from raindrop import Raindrop
client = Raindrop()response = client.bucket.put( bucket_location={ "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app", } }, content="U3RhaW5sZXNzIHJvY2tz", content_type="application/pdf", key="my-key",)print(response.bucket)package main
import ( "context" "fmt"
"github.com/LiquidMetal-AI/lm-raindrop-go-sdk" "github.com/LiquidMetal-AI/lm-raindrop-go-sdk/option")
func main() { client := raindrop.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.Bucket.Put(context.TODO(), raindrop.BucketPutParams{ BucketLocation: raindrop.BucketLocatorParam{Bucket: raindrop.LiquidmetalV1alpha1BucketNameParam{ApplicationName: "my-app", Name: "my-bucket", Version: "01jtryx2f2f61ryk06vd8mr91p"}}, Content: "U3RhaW5sZXNzIHJvY2tz", ContentType: "application/pdf", Key: "my-key", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Bucket)}package com.raindrop.api.example;
import com.raindrop.api.client.RaindropClient;import com.raindrop.api.client.okhttp.RaindropOkHttpClient;import com.raindrop.api.core.JsonValue;import com.raindrop.api.models.bucket.BucketPutParams;import com.raindrop.api.models.bucket.BucketPutResponse;import java.util.Map;
public final class Main { private Main() {}
public static void main(String[] args) { RaindropClient client = RaindropOkHttpClient.fromEnv();
BucketPutParams params = BucketPutParams.builder() .bucketLocation(JsonValue.from(Map.of( "bucket", Map.of( "name", "my-smartbucket", "version", "01jxanr45haeswhay4n0q8340y", "application_name", "my-app" ) ))) .content("U3RhaW5sZXNzIHJvY2tz") .contentType("application/pdf") .key("my-key") .build(); BucketPutResponse response = client.bucket().put(params); }}# Upload a file to a bucketnpx raindrop object put ./myfile.txt my-key -b my-bucket
# Upload with specific content typenpx raindrop object put ./myfile.json my-key -b my-bucket --content-type application/jsoncurl -X POST "https://api.raindrop.run/v1/put_object" \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ -d '{ "key": "my-key", "content": "example", "content_type": "application/pdf", "bucket_location": { "bucket": { "name": "my-smartbucket", "version": "01jxanr45haeswhay4n0q8340y", "application_name": "my-app" } }}'Response Examples
{ "bucket": { "moduleId": "01jt3vs2nyt2xwk2f54x2bkn84" }, "key": "test-object.txt"}