Images
Check app.capabilities for feature support and app.access plus host permissions for authorization. Examples use synthetic values; replace paths, IDs, inputs and filters before calling.
Type Definitions
type Subscription {
imageModelsUpdated: ImageModelsUpdate!
}
type Mutation {
cancelImageIndex: Boolean!
cancelImageModelDownload: Boolean!
disableImageSearch: Boolean!
enableImageSearch: Boolean!
importImageSearchModel: Boolean!
startImageIndex(force: Boolean): Boolean!
}
type Query {
imageCount(query: String!): Int!
imageSearchStatus: ImageSearchStatus!
images(query: String!, offset: Int!, limit: Int!, sortBy: ImageSortBy!): [Image!]!
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
type Image implements MediaItem {
id: ID!
title: String!
path: String!
size: Long!
width: Int!
height: Int!
rotation: Int!
bucketId: ID!
createdAt: Instant!
updatedAt: Instant!
takenAt: Instant
isFavorite: Boolean!
tags: [Tag!]!
}
type ImageModelsUpdate {
version: Long!
status: ImageSearchStatusType!
downloadProgress: Int!
errorMessage: String!
modelSize: Long!
modelDir: String!
isIndexing: Boolean!
totalImages: Int!
indexedImages: Int!
}
type ImageSearchStatus {
status: ImageSearchStatusType!
downloadProgress: Int!
errorMessage: String!
modelSize: Long!
modelDir: String!
isIndexing: Boolean!
totalImages: Int!
indexedImages: Int!
}
enum ImageSearchStatusType {
UNAVAILABLE
DOWNLOADING
LOADING
READY
ERROR
}
enum ImageSortBy {
UPDATED_AT_ASC
UPDATED_AT_DESC
SIZE_ASC
SIZE_DESC
NAME_ASC
NAME_DESC
TAKEN_AT_DESC
}
scalar Instant
scalar Long
interface MediaItem {
id: ID!
title: String!
path: String!
size: Long!
bucketId: ID!
createdAt: Instant!
updatedAt: Instant!
}
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}Operations
imageModelsUpdated
Receive image-search model download or availability updates.
subscription imageModelsUpdated {
imageModelsUpdated { version status downloadProgress errorMessage modelSize modelDir isIndexing totalImages }
}cancelImageIndex
Cancel the running indexing process.
mutation cancelImageIndex {
cancelImageIndex
}cancelImageModelDownload
Cancel the in-progress AI model download.
mutation cancelImageModelDownload {
cancelImageModelDownload
}disableImageSearch
Disable AI semantic image search and free up resources.
mutation disableImageSearch {
disableImageSearch
}enableImageSearch
Enable AI semantic image search. Downloads the on-device model if not already present.
mutation enableImageSearch {
enableImageSearch
}importImageSearchModel
Validate and activate a complete image-search model package that has already been uploaded.
mutation importImageSearchModel {
importImageSearchModel
}startImageIndex
Start indexing images for AI search. Pass force=true to re-index everything.
# `force` re-scans images that already have an embedding.
mutation startImageIndex($force: Boolean) {
startImageIndex(force: $force)
}imageCount
Count images matching a query.
query imageCount($query: String!) {
imageCount(query: $query)
}imageSearchStatus
Get the current AI semantic search indexing status.
query imageSearchStatus {
imageSearchStatus { status downloadProgress errorMessage modelSize modelDir isIndexing totalImages indexedImages }
}images
Search the image catalog with filtering, pagination and sorting.
query images($query: String!, $offset: Int!, $limit: Int!, $sortBy: ImageSortBy!) {
images(query: $query, offset: $offset, limit: $limit, sortBy: $sortBy) { id title path size width height rotation bucketId }
}