Organize and filter images with tags and metadata
Attach tags and metadata to every image, update them later and filter the listing API by them. You can organize images around your app’s data model without keeping a separate database table.
Three layers of organization
resourceTypeandresourceId: what the image belongs to in your app (for exampleproduct/sku-42). Required on every upload and part of the CDN URL.tags: up to 20 tags, each up to 64 characters from[a-zA-Z0-9:_.-]. Prefixed tags likeseason:2026work well.metadata: a free-form JSON object up to 4 KB, for alt text, sort order, source and similar.
Add them at upload
Send tags and metadata directly in the upload request.
curl -X POST https://api.nooknear.com/v1/media/upload-request \
-H "X-API-Key: $NOOKNEAR_KEY" -H "Content-Type: application/json" \
-d '{"resourceType":"product","resourceId":"sku-42","filename":"coffee.png","mimeType":"image/png","sizeBytes":482113,
"tags":["category:coffee","season:winter"],"metadata":{"order":1,"alt":"Bag of filter coffee"}}'Filter by tags and metadata
Pass tags=a,b to GET /v1/media to get only images that carry all of those tags. Pass a URL-encoded JSON object as metadata to list records whose metadata contains it. resourceType, resourceId, status and pagination (page, limit up to 100) are supported too.
curl -G https://api.nooknear.com/v1/media \
-H "X-API-Key: $NOOKNEAR_KEY" \
--data-urlencode "resourceType=product" \
--data-urlencode "tags=category:coffee,season:winter" \
--data-urlencode 'metadata={"order":1}' \
--data-urlencode "limit=50"Update them later
Use PATCH /v1/media/:assetId to change tags and metadata. Sending tags replaces the whole list. metadata is shallow-merged into the existing object by default; send "mergeMetadata": false to replace it entirely.
curl -X PATCH https://api.nooknear.com/v1/media/a1b2c3 \
-H "X-API-Key: $NOOKNEAR_KEY" -H "Content-Type: application/json" \
-d '{"tags":["category:coffee","promo"],"metadata":{"order":2}}'Frequently asked questions
Which characters can tags contain?
Letters a–z and A–Z, digits and : _ . -, up to 64 characters. Store free text such as captions in metadata.
What happens when I filter by several tags?
A tags=a,b query returns images that carry both tags (AND logic).
Can tags be generated automatically?
Today you set tags yourself. Content-based auto-tagging is among the planned AI features.
How large can metadata be?
Metadata must be a JSON object no larger than 4 KB.