Download OpenAPI specification:
Photo management system API with asset upload, processing, and organization features
Retrieve a paginated list of albums for the authenticated user
limit | integer Default: 20 Maximum number of results (max 100) |
offset | integer Default: 0 Number of results to skip for pagination |
{- "code": 0,
- "data": {
- "albums": [
- {
- "album_id": 0,
- "album_name": "string",
- "asset_count": 0,
- "cover_asset_id": "string",
- "created_at": "string",
- "description": "string",
- "updated_at": "string",
- "user_id": 0
}
], - "limit": 0,
- "offset": 0,
- "total": 0
}, - "error": "error details",
- "message": "success"
}
Create a new album for the authenticated user
Album creation data
album_name required | string |
cover_asset_id required | string |
description | string |
{- "album_name": "string",
- "cover_asset_id": "string",
- "description": "string"
}
{- "code": 0,
- "data": {
- "album_id": 0,
- "album_name": "string",
- "asset_count": 0,
- "cover_asset_id": "string",
- "created_at": "string",
- "description": "string",
- "updated_at": "string",
- "user_id": 0
}, - "error": "error details",
- "message": "success"
}
Retrieve a specific album by its ID
id required | integer Album ID |
{- "code": 0,
- "data": {
- "album_id": 0,
- "album_name": "string",
- "asset_count": 0,
- "cover_asset_id": "string",
- "created_at": "string",
- "description": "string",
- "updated_at": "string",
- "user_id": 0
}, - "error": "error details",
- "message": "success"
}
Update an existing album's information
id required | integer Album ID |
Album update data
album_name | string |
cover_asset_id | string |
description | string |
{- "album_name": "string",
- "cover_asset_id": "string",
- "description": "string"
}
{- "code": 0,
- "data": {
- "album_id": 0,
- "album_name": "string",
- "asset_count": 0,
- "cover_asset_id": "string",
- "created_at": "string",
- "description": "string",
- "updated_at": "string",
- "user_id": 0
}, - "error": "error details",
- "message": "success"
}
Remove an asset from a specific album
id required | integer Album ID |
assetId required | string Asset ID (UUID format) |
{- "code": 0,
- "data": { },
- "error": "error details",
- "message": "success"
}
Add an asset to a specific album
id required | integer Album ID |
assetId required | string Asset ID (UUID format) |
Asset position in album
position | integer |
{- "position": 0
}
{- "code": 0,
- "data": { },
- "error": "error details",
- "message": "success"
}
Update the position of an asset within a specific album
id required | integer Album ID |
assetId required | string Asset ID (UUID format) |
New position for the asset
position required | integer |
{- "position": 0
}
{- "code": 0,
- "data": { },
- "error": "error details",
- "message": "success"
}
Retrieve a paginated list of assets. Filter by type, owner, or search query. Use 'vector=true|false' to control semantic vector search when 'q' is provided (feature must be enabled). At least one filter parameter is required.
type | string Enum: "PHOTO" "VIDEO" "AUDIO" "DOCUMENT" Example: type="PHOTO" Asset type filter |
owner_id | integer Example: owner_id=123 Filter by owner ID |
q | string Example: q="red bird on a branch" Search query (semantic vector search when enabled) and filename match |
vector | boolean Default: false When q is set: true to use semantic vector search, false to use filename search |
limit | integer Default: 20 Example: limit=20 Maximum number of results (max 100) |
offset | integer Default: 0 Number of results to skip for pagination |
{- "code": 0,
- "data": {
- "assets": [
- {
- "asset_id": "string",
- "deleted_at": "string",
- "duration": 0,
- "file_size": 0,
- "hash": "string",
- "height": 0,
- "is_deleted": true,
- "mime_type": "string",
- "original_filename": "string",
- "owner_id": 0,
- "specific_metadata": { },
- "storage_path": "string",
- "type": "string",
- "upload_time": "string",
- "width": 0
}
], - "limit": 20,
- "offset": 0
}, - "error": "error details",
- "message": "success"
}
Upload a single photo, video, audio file, or document to the system. The file is staged and queued for processing.
X-Content-Hash | string MLService-calculated BLAKE3 hash of the file |
file required | string <binary> Asset file to upload |
{- "code": 0,
- "data": {
- "content_hash": "abcd1234567890",
- "file_name": "photo.jpg",
- "message": "File received and queued for processing",
- "size": 1048576,
- "status": "processing",
- "task_id": 12345
}, - "error": "error details",
- "message": "success"
}
Soft delete an asset by marking it as deleted. The physical file is not removed.
id required | string Example: "550e8400-e29b-41d4-a716-446655440000" Asset ID (UUID format) |
{- "code": 0,
- "data": {
- "message": "Operation completed successfully"
}, - "error": "error details",
- "message": "success"
}
Retrieve detailed information about a specific asset. Optionally include thumbnails, tags, and albums.
id required | string Example: "550e8400-e29b-41d4-a716-446655440000" Asset ID (UUID format) |
include_thumbnails | boolean Default: true Include thumbnails |
include_tags | boolean Default: true Include tags |
include_albums | boolean Default: true Include albums |
{- "code": 0,
- "data": {
- "asset_id": "string",
- "deleted_at": "string",
- "duration": 0,
- "file_size": 0,
- "hash": "string",
- "height": 0,
- "is_deleted": true,
- "mime_type": "string",
- "original_filename": "string",
- "owner_id": 0,
- "specific_metadata": { },
- "storage_path": "string",
- "type": "string",
- "upload_time": "string",
- "width": 0
}, - "error": "error details",
- "message": "success"
}
Update the specific metadata of an asset (e.g., photo EXIF data, video metadata).
id required | string Example: "550e8400-e29b-41d4-a716-446655440000" Asset ID (UUID format) |
Updated metadata
specific_metadata | object |
{- "specific_metadata": { }
}
{- "code": 0,
- "data": {
- "message": "Operation completed successfully"
}, - "error": "error details",
- "message": "success"
}
Associate an asset with a specific album by asset ID and album ID.
id required | string Example: "550e8400-e29b-41d4-a716-446655440000" Asset ID (UUID format) |
albumId required | integer Example: 123 Album ID |
{- "code": 0,
- "data": {
- "message": "Operation completed successfully"
}, - "error": "error details",
- "message": "success"
}
Retrieve a specific thumbnail image for an asset by asset ID and size parameter. Returns the image file directly.
id required | string Example: "550e8400-e29b-41d4-a716-446655440000" Asset ID (UUID format) |
size | string Default: "medium" Enum: "small" "medium" "large" Thumbnail size |
Batch upload multiple assets using a multipart/form-data request. Each file part's field name must be its BLAKE3 content hash. All files are staged and queued for processing.
{- "code": 0,
- "data": {
- "results": [
- {
- "content_hash": "string",
- "error": "string",
- "file_name": "string",
- "message": "string",
- "size": 0,
- "status": "string",
- "success": true,
- "task_id": 0
}
]
}, - "error": "error details",
- "message": "success"
}
Filter assets using comprehensive filtering options including RAW, rating, liked status, filename patterns, date ranges, camera make, and lens
Filter criteria
object (handler.AssetFilter) | |
limit | integer [ 1 .. 100 ] |
offset | integer >= 0 |
{- "filter": {
- "camera_make": "Canon",
- "date": {
- "from": "string",
- "to": "string"
}, - "filename": {
- "mode": "startswith",
- "value": "IMG_"
}, - "lens": "EF 50mm f/1.8",
- "liked": true,
- "owner_id": 123,
- "rating": 5,
- "raw": true,
- "type": "PHOTO"
}, - "limit": 20,
- "offset": 0
}
{- "code": 0,
- "data": {
- "assets": [
- {
- "asset_id": "string",
- "deleted_at": "string",
- "duration": 0,
- "file_size": 0,
- "hash": "string",
- "height": 0,
- "is_deleted": true,
- "mime_type": "string",
- "original_filename": "string",
- "owner_id": 0,
- "specific_metadata": { },
- "storage_path": "string",
- "type": "string",
- "upload_time": "string",
- "width": 0
}
], - "limit": 20,
- "offset": 0
}, - "error": "error details",
- "message": "success"
}
Search assets using either filename matching or semantic vector search. Can be combined with comprehensive filters.
Search criteria
object (handler.AssetFilter) | |
limit | integer [ 1 .. 100 ] |
offset | integer >= 0 |
query required | string |
search_type required | string Enum: "filename" "semantic" |
{- "filter": {
- "camera_make": "Canon",
- "date": {
- "from": "string",
- "to": "string"
}, - "filename": {
- "mode": "startswith",
- "value": "IMG_"
}, - "lens": "EF 50mm f/1.8",
- "liked": true,
- "owner_id": 123,
- "rating": 5,
- "raw": true,
- "type": "PHOTO"
}, - "limit": 20,
- "offset": 0,
- "query": "red bird on branch",
- "search_type": "filename"
}
{- "code": 0,
- "data": {
- "assets": [
- {
- "asset_id": "string",
- "deleted_at": "string",
- "duration": 0,
- "file_size": 0,
- "hash": "string",
- "height": 0,
- "is_deleted": true,
- "mime_type": "string",
- "original_filename": "string",
- "owner_id": 0,
- "specific_metadata": { },
- "storage_path": "string",
- "type": "string",
- "upload_time": "string",
- "width": 0
}
], - "limit": 20,
- "offset": 0
}, - "error": "error details",
- "message": "success"
}
Authenticate user with username and password
Login credentials
password required | string |
username required | string |
{- "password": "string",
- "username": "string"
}
{- "code": 0,
- "data": {
- "expiresAt": "string",
- "refreshToken": "string",
- "token": "string",
- "user": {
- "created_at": "string",
- "email": "string",
- "is_active": true,
- "last_login": "string",
- "user_id": 0,
- "username": "string"
}
}, - "error": "error details",
- "message": "success"
}
Revoke the user's refresh token
Refresh token to revoke
refreshToken required | string |
{- "refreshToken": "string"
}
{- "code": 0,
- "data": { },
- "error": "error details",
- "message": "success"
}
Get information about the currently authenticated user
{- "code": 0,
- "data": {
- "created_at": "string",
- "email": "string",
- "is_active": true,
- "last_login": "string",
- "user_id": 0,
- "username": "string"
}, - "error": "error details",
- "message": "success"
}
Generate a new access token using a valid refresh token
Refresh token
refreshToken required | string |
{- "refreshToken": "string"
}
{- "code": 0,
- "data": {
- "expiresAt": "string",
- "refreshToken": "string",
- "token": "string",
- "user": {
- "created_at": "string",
- "email": "string",
- "is_active": true,
- "last_login": "string",
- "user_id": 0,
- "username": "string"
}
}, - "error": "error details",
- "message": "success"
}
Create a new user account with username, email, and password
Registration data
email required | string |
password required | string >= 6 characters |
username required | string [ 3 .. 50 ] characters |
{- "email": "string",
- "password": "string",
- "username": "string"
}
{- "code": 0,
- "data": {
- "expiresAt": "string",
- "refreshToken": "string",
- "token": "string",
- "user": {
- "created_at": "string",
- "email": "string",
- "is_active": true,
- "last_login": "string",
- "user_id": 0,
- "username": "string"
}
}, - "error": "error details",
- "message": "success"
}