Download OpenAPI specification:
Photo management system API with asset upload, processing, and organization features
Retrieve a paginated list of assets with optional filtering by type, owner, or search query
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="vacation" Search query for filename |
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": [
- {
- "albums": [
- {
- "album_id": 1,
- "album_name": "Vacation 2024",
- "assets": [
- { }
], - "cover_asset": { },
- "cover_asset_id": "550e8400-e29b-41d4-a716-446655440000",
- "created_at": "2024-01-15T10:30:00Z",
- "description": "Photos and videos from our summer vacation",
- "updated_at": "2024-01-16T10:30:00Z",
- "user_id": 123
}
], - "asset_id": "550e8400-e29b-41d4-a716-446655440000",
- "deleted_at": "2024-01-16T10:30:00Z",
- "duration": 120.5,
- "embedding": [
- 0
], - "file_size": 1048576,
- "hash": "abcd1234567890efgh",
- "height": 1080,
- "is_deleted": false,
- "mime_type": "image/jpeg",
- "original_filename": "vacation_photo.jpg",
- "owner_id": 123,
- "specific_metadata": { },
- "storage_path": "2024/01/abc123.jpg",
- "tags": [
- {
- "assets": [
- { }
], - "category": "subject",
- "is_ai_generated": true,
- "tag_id": 1,
- "tag_name": "landscape"
}
], - "thumbnails": [
- {
- "asset_id": "550e8400-e29b-41d4-a716-446655440000",
- "created_at": "2024-01-15T10:30:00Z",
- "mime_type": "image/jpeg",
- "size": "medium",
- "storage_path": "thumbnails/2024/01/thumb_abc123.jpg",
- "thumbnail_id": 1
}
], - "type": "PHOTO",
- "upload_time": "2024-01-15T10:30:00Z",
- "width": 1920
}
], - "limit": 20,
- "offset": 0
}, - "error": "error details",
- "message": "success"
}
Upload a single photo, video, audio file or document to the system
X-Content-Hash | string Client-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": "550e8400-e29b-41d4-a716-446655440000"
}, - "error": "error details",
- "message": "success"
}
Soft delete an asset by marking it as deleted (does not remove the physical file)
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 with optional relationships
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": {
- "albums": [
- {
- "album_id": 1,
- "album_name": "Vacation 2024",
- "assets": [
- { }
], - "cover_asset": { },
- "cover_asset_id": "550e8400-e29b-41d4-a716-446655440000",
- "created_at": "2024-01-15T10:30:00Z",
- "description": "Photos and videos from our summer vacation",
- "updated_at": "2024-01-16T10:30:00Z",
- "user_id": 123
}
], - "asset_id": "550e8400-e29b-41d4-a716-446655440000",
- "deleted_at": "2024-01-16T10:30:00Z",
- "duration": 120.5,
- "embedding": [
- 0
], - "file_size": 1048576,
- "hash": "abcd1234567890efgh",
- "height": 1080,
- "is_deleted": false,
- "mime_type": "image/jpeg",
- "original_filename": "vacation_photo.jpg",
- "owner_id": 123,
- "specific_metadata": { },
- "storage_path": "2024/01/abc123.jpg",
- "tags": [
- {
- "assets": [
- { }
], - "category": "subject",
- "is_ai_generated": true,
- "tag_id": 1,
- "tag_name": "landscape"
}
], - "thumbnails": [
- {
- "asset_id": "550e8400-e29b-41d4-a716-446655440000",
- "created_at": "2024-01-15T10:30:00Z",
- "mime_type": "image/jpeg",
- "size": "medium",
- "storage_path": "thumbnails/2024/01/thumb_abc123.jpg",
- "thumbnail_id": 1
}
], - "type": "PHOTO",
- "upload_time": "2024-01-15T10:30:00Z",
- "width": 1920
}, - "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
object (models.SpecificMetadata) Type-specific metadata stored as JSON |
{- "metadata": { }
}
{- "code": 0,
- "data": {
- "message": "Operation completed successfully"
}, - "error": "error details",
- "message": "success"
}
Associate an asset with a specific album
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
id required | string Example: "550e8400-e29b-41d4-a716-446655440000" Asset ID (UUID format) |
size | string Default: "\"medium\"" Enum: "small" "medium" "large" Thumbnail size |
"string"
Batch uploads multiple assets using a multipart/form-data request. The field name for each file part must be its BLAKE3 content hash.
{- "code": 0,
- "data": {
- "results": [
- {
- "content_hash": "string",
- "error": "string",
- "file_name": "string",
- "message": "string",
- "size": 0,
- "status": "string",
- "success": true,
- "task_id": "string"
}
]
}, - "error": "error details",
- "message": "success"
}
Authenticate user with username and password
Login credentials
password required | string |
username required | string |
{- "password": "securepassword123",
- "username": "john_doe"
}
{- "code": 0,
- "data": {
- "expiresAt": "2024-01-16T10:30:00Z",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "user": {
- "created_at": "2024-01-15T10:30:00Z",
- "email": "john@example.com",
- "is_active": true,
- "last_login": "2024-01-16T15:45:00Z",
- "user_id": 1,
- "username": "john_doe"
}
}, - "error": "error details",
- "message": "success"
}
Revoke the user's refresh token
Refresh token to revoke
refreshToken required | string |
{- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{- "code": 0,
- "data": { },
- "error": "error details",
- "message": "success"
}
Get information about the currently authenticated user
{- "code": 0,
- "data": {
- "created_at": "2024-01-15T10:30:00Z",
- "email": "john@example.com",
- "is_active": true,
- "last_login": "2024-01-16T15:45:00Z",
- "user_id": 1,
- "username": "john_doe"
}, - "error": "error details",
- "message": "success"
}
Generate a new access token using a valid refresh token
Refresh token
refreshToken required | string |
{- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{- "code": 0,
- "data": {
- "expiresAt": "2024-01-16T10:30:00Z",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "user": {
- "created_at": "2024-01-15T10:30:00Z",
- "email": "john@example.com",
- "is_active": true,
- "last_login": "2024-01-16T15:45:00Z",
- "user_id": 1,
- "username": "john_doe"
}
}, - "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": "john@example.com",
- "password": "securepassword123",
- "username": "john_doe"
}
{- "code": 0,
- "data": {
- "expiresAt": "2024-01-16T10:30:00Z",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "user": {
- "created_at": "2024-01-15T10:30:00Z",
- "email": "john@example.com",
- "is_active": true,
- "last_login": "2024-01-16T15:45:00Z",
- "user_id": 1,
- "username": "john_doe"
}
}, - "error": "error details",
- "message": "success"
}