item (Read)¶
Operations for querying, counting, fetching, inspecting embedded EXIF/PNG metadata, reading unindexed fields on demand and finding visually similar items. All operations in this group target a library (pass optional library to route to a specific library).
item.query¶
Search and paginate items in a library using the Query language.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query |
string |
No | "" |
Query language expression (e.g. tag = sky AND rating >= 4). Empty matches every item in scope. |
scope |
string |
No | "all" |
One of all, uncategorized, untagged, recent, trash, missing. |
sort |
string |
No | "imported" |
One of imported, modified, created, name, size, rating, resolution, duration or field:<key>. |
descending |
boolean |
No | true |
true for newest/largest/highest first; false for ascending. |
offset |
number |
No | 0 |
Zero-based pagination offset. |
limit |
number |
No | 50 |
Maximum items to return (1–1000). |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns Page<Item> ({ total, offset, items }). Item.path is included only with files.read.
Example request
Example response
{
"total": 42,
"offset": 0,
"items": [
{
"id": "0194b7a2-8c1e-7a40-b2d1-3f9e81c4a012",
"name": "Dawn clouds",
"fileName": "dawn_clouds.png",
"ext": "png",
"kind": "image",
"size": 2410290,
"width": 2560,
"height": 1440,
"duration": null,
"rating": 5,
"favorite": false,
"explicit": false,
"annotation": "",
"url": "",
"tags": ["sky", "landscape"],
"folders": [{ "id": 3, "name": "References" }],
"status": "Available",
"imported": 1763900000000,
"modified": 1763890000000,
"parts": 0
}
]
}
Events and errors Read-only. Returns 400 bad_request on invalid query syntax, unindexed field references or unknown scope/sort. See also item.count, item.getMany, query.validate.
item.count¶
Count items matching a query without fetching item rows.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query |
string |
No | "" |
Query language expression; empty counts all items in scope. |
scope |
string |
No | "all" |
all, uncategorized, untagged, recent, trash or missing. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns { count: number }.
Example request
Example response
Events and errors Read-only. Returns 400 bad_request on invalid query syntax or unindexed field names.
item.get¶
Fetch a single item along with all of its stored custom field values and (when grouped) its member file descriptors.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Item UUIDv7 or integer row ID. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns ItemWithFields.
Example request
Example response
{
"id": "0194b7a2-8c1e-7a40-b2d1-3f9e81c4a012",
"name": "Dawn clouds",
"fileName": "dawn_clouds.png",
"ext": "png",
"kind": "image",
"size": 2410290,
"width": 2560,
"height": 1440,
"duration": null,
"rating": 5,
"favorite": false,
"explicit": false,
"annotation": "",
"url": "",
"tags": ["sky"],
"folders": [{ "id": 3, "name": "References" }],
"status": "Available",
"imported": 1763900000000,
"modified": 1763890000000,
"parts": 0,
"fields": { "camera": "Sony A7 IV", "iso": 100 }
}
Events and errors Read-only. Returns 404 not_found if no item has that ID.
item.getMany¶
Fetch multiple items with their custom fields and grouped members in one call, preserving input order.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
ids |
(string \| number)[] |
Yes | — | Item UUIDs or row IDs. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns ItemWithFields[].
Example request
Example response
[
{
"id": "0194b7a2-8c1e-7a40-b2d1-3f9e81c4a012",
"name": "Dawn clouds",
"fileName": "dawn_clouds.png",
"ext": "png",
"kind": "image",
"size": 2410290,
"width": 2560,
"height": 1440,
"duration": null,
"rating": 5,
"favorite": false,
"explicit": false,
"annotation": "",
"url": "",
"tags": ["sky"],
"folders": [{ "id": 3, "name": "References" }],
"status": "Available",
"imported": 1763900000000,
"modified": 1763890000000,
"parts": 0,
"fields": { "camera": "Sony A7 IV", "iso": 100 }
}
]
Events and errors Read-only. Returns 404 not_found if any requested ID does not exist.
item.readFields¶
Run Curio's built-in file readers and plugins' declarative readers (png_text, regex, json) directly against an item's file on disk without storing the results in the library database. By default reads fields whose indexing switch is off in Settings › Fields. External plugin CLI programs are not invoked.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Item UUID or row ID. |
keys |
string[] |
No | All unindexed file-reading fields | Restrict reading to specific field keys. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns { fields: Record<string, unknown> }.
Example request
Example response
Events and errors Read-only; emits no events. Returns 404 not_found if the item or its file on disk is missing/offline.
item.exif¶
Read raw EXIF tags directly from an image item on disk as a key-to-string map. Returns { "tags": {} } when the file carries no EXIF block.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Item UUID or row ID. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns { tags: Record<string, string> }.
Example request
Example response
{
"tags": {
"Make": "SONY",
"Model": "ILCE-7M4",
"FNumber": "f/2.8",
"ExposureTime": "1/500 s",
"PhotographicSensitivity": "100"
}
}
Events and errors Read-only. Returns 404 not_found if the item or file is missing/offline.
item.pngText¶
Read PNG tEXt, zTXt and iTXt metadata chunks by keyword (commonly used for AI generation prompts and ComfyUI workflows). Returns { "chunks": {} } for non-PNG files or PNGs without text chunks.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Item UUID or row ID. |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns { chunks: Record<string, string> }.
Example request
Example response
{
"chunks": {
"parameters": "masterpiece, mountain lake at sunrise\nSteps: 20, Sampler: Euler a, CFG scale: 7"
}
}
Events and errors Read-only. Returns 404 not_found if the item or file is missing/offline.
item.similar¶
Find visually similar items ordered from highest to lowest similarity using Curio's stored perceptual thumbnail fingerprints.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string \| number |
Yes | — | Reference item UUID or row ID. |
threshold |
number |
No | 0.8 |
Minimum similarity score (0.0–1.0, fraction of agreeing fingerprint bits). |
limit |
number |
No | 50 |
Maximum matches to return (1–1000). |
library |
string |
No | Default library | Routing parameter: library ID from library.list, folder path or name. Not allowed for plugin callers. |
Returns { id: string; similarity: number }[].
Example request
Example response
[
{ "id": "0194b7a9-1122-7c00-9abc-def012345678", "similarity": 0.96 },
{ "id": "0194b7aa-3344-7d11-8def-0123456789ab", "similarity": 0.89 }
]
Events and errors Read-only. Returns 404 not_found if id does not exist; returns [] if the item has no thumbnail fingerprint yet. See also duplicates.find.