Gallery
Store, organize, and share your AI-generated content.
Stable
Overview
The Gallery provides:
- Storage: All generated images and videos
- Organization: Collections and tags
- Sharing: Public links and embeds
- Management: Download, delete, and organize
Dashboard
Access your gallery at Dashboard → Gallery.
API
List Gallery Items
curl -X GET "https://cloud.milady.ai/api/v1/gallery?type=image&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"items": [
{
"id": "gal_abc123",
"type": "image",
"url": "https://your-storage.vercel-storage.com/images/abc123.png",
"prompt": "A sunset over mountains",
"model": "google/gemini-2.5-flash-image",
"width": 1024,
"height": 1024,
"createdAt": "2024-01-15T10:30:00Z",
"tags": ["landscape", "sunset"]
}
],
"total": 150,
"page": 1,
"pageSize": 20
}Query Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | image or video |
limit | integer | Items per page (max 100) |
page | integer | Page number |
tags | string | Filter by tags (comma-separated) |
collection | string | Filter by collection ID |
search | string | Search prompts |
Get Single Item
curl -X GET "https://cloud.milady.ai/api/v1/gallery/gal_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"Delete Item
curl -X DELETE "https://cloud.milady.ai/api/v1/gallery/gal_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"Collections
Organize items into collections:
Create Collection
curl -X POST "https://cloud.milady.ai/api/v1/gallery/collections" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Product Shots",
"description": "Generated product images"
}'Add to Collection
curl -X POST "https://cloud.milady.ai/api/v1/gallery/collections/{collectionId}/items" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"itemIds": ["gal_abc123", "gal_def456"]
}'List Collections
curl -X GET "https://cloud.milady.ai/api/v1/gallery/collections" \
-H "Authorization: Bearer YOUR_API_KEY"Tags
Add tags for organization:
Update Tags
curl -X PATCH "https://cloud.milady.ai/api/v1/gallery/gal_abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tags": ["landscape", "sunset", "mountain"]
}'Search by Tags
curl -X GET "https://cloud.milady.ai/api/v1/gallery?tags=landscape,sunset" \
-H "Authorization: Bearer YOUR_API_KEY"Sharing
Generate Share Link
curl -X POST "https://cloud.milady.ai/api/v1/gallery/gal_abc123/share" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expiresIn": "7d",
"password": "optional-password"
}'{
"shareUrl": "https://cloud.milady.ai/share/xyz789",
"expiresAt": "2024-01-22T10:30:00Z"
}Share Options
| Option | Description |
|---|---|
expiresIn | Link expiration (1h, 1d, 7d, 30d, never) |
password | Optional password protection |
allowDownload | Allow visitors to download |
Revoke Share
curl -X DELETE "https://cloud.milady.ai/api/v1/gallery/gal_abc123/share" \
-H "Authorization: Bearer YOUR_API_KEY"Storage
Storage Limits
| Plan | Storage |
|---|---|
| Free | 1 GB |
| Pro | 50 GB |
| Enterprise | Unlimited |
Check Usage
curl -X GET "https://cloud.milady.ai/api/v1/gallery/storage" \
-H "Authorization: Bearer YOUR_API_KEY"{
"used": 1073741824,
"limit": 53687091200,
"usedFormatted": "1 GB",
"limitFormatted": "50 GB"
}Bulk Operations
Bulk Delete
curl -X POST "https://cloud.milady.ai/api/v1/gallery/bulk/delete" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"itemIds": ["gal_abc123", "gal_def456", "gal_ghi789"]
}'Bulk Tag
curl -X POST "https://cloud.milady.ai/api/v1/gallery/bulk/tag" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"itemIds": ["gal_abc123", "gal_def456"],
"tags": ["approved", "final"]
}'Download
Single Item
curl -X GET "https://cloud.milady.ai/api/v1/gallery/gal_abc123/download" \
-H "Authorization: Bearer YOUR_API_KEY" \
--output image.pngBulk Download (ZIP)
curl -X POST "https://cloud.milady.ai/api/v1/gallery/bulk/download" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"itemIds": ["gal_abc123", "gal_def456"]
}' \
--output gallery.zipAuto-Save
Generated content is automatically saved to your gallery:
const image = await client.images.generate({
prompt: "A beautiful sunset",
saveToGallery: true, // Default: true
galleryTags: ["sunset", "landscape"],
});
console.log(image.galleryId); // gal_abc123Best Practices
- Organize Early — Use collections and tags from the start to stay organized
- Clean Up — Delete unwanted generations regularly to save storage quota
- Backup — Download important content periodically using bulk export
- Share Wisely — Use expiring links with passwords for sensitive content