API Reference

Images

Browse, search, and tag photos. Supports both keyword search and AI semantic search with an on-device model.

Type Definitions

bash
type Image {
  id: ID!
  title: String!         # filename
  path: String!
  size: Int!             # bytes
  bucketId: String!      # media store bucket
  createdAt: String!
  updatedAt: String!
  takenAt: String        # EXIF capture time (nullable)
  tags: [Tag!]!
}

type ImageSearchStatus {
  enabled: Boolean!
  indexed: Int!
  total: Int!
  isIndexing: Boolean!
  isDownloading: Boolean!
  downloadProgress: Float!  # 0.0–1.0
}

enum FileSortBy {
  SIZE_ASC SIZE_DESC
  NAME_ASC NAME_DESC
  DATE_ADDED_ASC DATE_ADDED_DESC
  DATE_MODIFIED_ASC DATE_MODIFIED_DESC
}

Operations

query

images

Search images. Leave query empty to list all. Use text:<keyword> for AI semantic search.

bash
query GetImages($offset: Int!, $limit: Int!, $query: String!, $sortBy: FileSortBy!) {
  images(offset: $offset, limit: $limit, query: $query, sortBy: $sortBy) {
    id title path size bucketId createdAt updatedAt takenAt
    tags { id name }
  }
}
query

imageCount

Count images matching a query.

bash
query GetImageCount($query: String!) {
  imageCount(query: $query)
}
query

imageSearchStatus

Get the current AI semantic search indexing status.

bash
query GetImageSearchStatus {
  imageSearchStatus {
    enabled indexed total isIndexing isDownloading downloadProgress
  }
}
mutation

enableImageSearch

Enable AI semantic image search. Downloads the on-device model if not already present.

bash
mutation EnableImageSearch {
  enableImageSearch
}
mutation

disableImageSearch

Disable AI semantic image search and free up resources.

bash
mutation DisableImageSearch {
  disableImageSearch
}
mutation

cancelImageModelDownload

Cancel the in-progress AI model download.

bash
mutation CancelImageModelDownload {
  cancelImageModelDownload
}
mutation

startImageIndex

Start indexing images for AI search. Pass force=true to re-index everything.

bash
mutation StartImageIndex($force: Boolean) {
  startImageIndex(force: $force)
}
mutation

cancelImageIndex

Cancel the running indexing process.

bash
mutation CancelImageIndex {
  cancelImageIndex
}