Working with Images
Upload, manage, and organize your images. CDN delivery, aliases, and image management.
Image URLs
All images are served via CDN with this URL structure:
CDN URL Format
https://cdn.banatie.app/{org}/{project}/img/{imageId}URLs are permanent, fast, and cached globally. Use them directly in your applications.
Uploading Images
Upload your own images for use as brand assets, references, or logos:
Upload Image
curl -X POST https://api.banatie.app/api/v1/images/upload \
-H "X-API-Key: YOUR_API_KEY" \
-F "[email protected]" \
-F "alias=@brand-logo"Response includes the CDN URL and image details:
201 Created
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"storageUrl": "https://cdn.banatie.app/my-org/my-project/img/550e8400-e29b-41d4-a716-446655440000",
"alias": "@brand-logo",
"source": "uploaded",
"width": 512,
"height": 512,
"mimeType": "image/png",
"fileSize": 24576
}
}Listing & Getting Images
List all images in your project:
List Images
curl https://api.banatie.app/api/v1/images \
-H "X-API-Key: YOUR_API_KEY"Get a specific image by ID or alias:
Get Image
# By UUID
curl https://api.banatie.app/api/v1/images/550e8400-e29b-41d4-a716-446655440000 \
-H "X-API-Key: YOUR_API_KEY"
# By alias
curl https://api.banatie.app/api/v1/images/@brand-logo \
-H "X-API-Key: YOUR_API_KEY"Aliases
Assign memorable names to images. Aliases start with @ and make it easy to reference images without remembering UUIDs.
Assign Alias
curl -X PUT https://api.banatie.app/api/v1/images/550e8400-e29b-41d4-a716-446655440000/alias \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"alias": "@hero-background"}'Access images via CDN using their alias:
CDN Alias URL
https://cdn.banatie.app/my-org/my-project/img/@hero-backgroundPro Tip: Use aliases for brand assets like
@logo, @brand-colors. Reference them in generations without remembering UUIDs.Remove an alias by setting it to null:
Remove Alias
curl -X PUT https://api.banatie.app/api/v1/images/550e8400-e29b-41d4-a716-446655440000/alias \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"alias": null}'Deleting Images
Delete an image by ID or alias. This permanently removes the image from storage.
Delete Image
curl -X DELETE https://api.banatie.app/api/v1/images/550e8400-e29b-41d4-a716-446655440000 \
-H "X-API-Key: YOUR_API_KEY"Deletion is permanent. The image file and all references are removed.