JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
await box.media.createAlbum({
name: "vacation-2024",
media: [
"/path/to/photo1.jpg",
"/path/to/photo2.jpg",
]
})
await box.media.deleteAlbum("vacation-2024");
}
main();import os
from gbox_sdk import GboxSDK
def main():
# Initialize GboxSDK with API key from environment variable
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create an Android box for media operations
box = gbox_sdk.create(type="android")
# Create an album with media files first
box.media.create_album(
name="vacation-2024",
media=[
"/path/to/photo1.jpg",
"/path/to/photo2.jpg",
]
)
# Delete the specific album by name
box.media.delete_album("vacation-2024")
print("✅ Album 'vacation-2024' deleted successfully")
if __name__ == "__main__":
main()curl --request DELETE \
--url https://gbox.ai/api/v1/boxes/{boxId}/media/albums/{albumName} \
--header 'Authorization: Bearer <token>'Media
Delete album
Delete an album and all its media files
DELETE
/
boxes
/
{boxId}
/
media
/
albums
/
{albumName}
JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
await box.media.createAlbum({
name: "vacation-2024",
media: [
"/path/to/photo1.jpg",
"/path/to/photo2.jpg",
]
})
await box.media.deleteAlbum("vacation-2024");
}
main();import os
from gbox_sdk import GboxSDK
def main():
# Initialize GboxSDK with API key from environment variable
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create an Android box for media operations
box = gbox_sdk.create(type="android")
# Create an album with media files first
box.media.create_album(
name="vacation-2024",
media=[
"/path/to/photo1.jpg",
"/path/to/photo2.jpg",
]
)
# Delete the specific album by name
box.media.delete_album("vacation-2024")
print("✅ Album 'vacation-2024' deleted successfully")
if __name__ == "__main__":
main()curl --request DELETE \
--url https://gbox.ai/api/v1/boxes/{boxId}/media/albums/{albumName} \
--header 'Authorization: Bearer <token>'Authorizations
Enter your API Key in the format: Bearer . Get it from https://gbox.ai
Path Parameters
Box ID
Example:
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
Album name
Example:
"Pictures"
Response
204
Album deleted successfully
Was this page helpful?
⌘I