Skip to Content

Gallery

Store, organize, and share your AI-generated content.

Stable

Overview

The Gallery provides:

Dashboard

Access your gallery at Dashboard → Gallery.

API

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

ParameterTypeDescription
typestringimage or video
limitintegerItems per page (max 100)
pageintegerPage number
tagsstringFilter by tags (comma-separated)
collectionstringFilter by collection ID
searchstringSearch 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

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

OptionDescription
expiresInLink expiration (1h, 1d, 7d, 30d, never)
passwordOptional password protection
allowDownloadAllow 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

PlanStorage
Free1 GB
Pro50 GB
EnterpriseUnlimited

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.png

Bulk 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.zip

Auto-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_abc123

Best Practices

Next Steps