Paillette API
Resolve a source, search or translate through REST, and manage artwork records and collections with provenance-aware metadata.
https://paillette-api-stg.berlayar.ai/api/v1AuthX-API-KeySourcengsAuthentication
Server-to-server calls use X-API-Key. Public source discovery and collection reads work without a key; search, artwork lookup, translation, extract, and management writes require one.
MCP clients connect to /api/v1/mcp using Streamable HTTP JSON-RPC. Protected resource metadata is exposed at /.well-known/oauth-protected-resource and /.well-known/oauth-protected-resource/api/v1/mcp.
API keys can call all available MCP tools. OAuth tokens need mcp:all or matching grouped scopes such as mcp:read, mcp:write, artworks:read, collections:write, translations:create, or extract:create.
Field sources
Search results include normalized metadata plus source labels. Check these fields before displaying catalogue text or citations.
results[].metadata.descriptionVerified Roots/NHB catalogue caption selected for display when available. NGS Art+ payload descriptions are retained in source_records, not exposed as public caption text.
results[].metadata.field_sourcesPer-field source labels, for example description: roots or title: ngs.
results[].metadata.source_provenanceSource URLs used for normalized fields, including Roots/NHB refs where a Roots caption is used.
results[].metadata.source_records.ngsOriginal NGS source payload excerpt. This is useful for catalogue fields, identifiers, credit lines, and NGS image/detail refs.
/api/v1/orgspublicList sources
List public sources and the keys used in REST paths and MCP arguments.
Path0 fields
No path fields.
Body1 field
limitOptional query param. Range: 1-100.
Response3 fields
data[].keyShort source key used in search paths and MCP arguments.
data[].slugCanonical public source slug.
metadata.totalTotal number of sources available to the caller.
/api/v1/orgs/slug/{slug}publicLookup source
Resolve a source by canonical slug before building source-specific calls.
Path1 field
slugPath param. Source slug, for example national-gallery-singapore.
Body0 fields
No body fields.
Response3 fields
data[].keyShort source key used in search paths and MCP arguments.
data[].slugCanonical public source slug.
metadata.totalTotal number of sources available to the caller.
/api/v1/orgspublicsample onlyCreate source
Create a source owned by the authenticated principal. The generated source API key is returned only on creation.
Path0 fields
No path fields.
Body4 fields
nameSource display name.
slugOptional stable URL/API slug. Generated from name if omitted.
descriptionOptional public or internal description.
websiteOptional source website URL.
Response3 fields
data.idCreated source ID.
data.slugCreated source slug.
data.api_keyGenerated source API key. Returned only on creation.
/api/v1/orgs/{orgKey}/search/textrequires keyText search
Natural-language search against a source's text embeddings.
Path1 field
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
Body3 fields
queryNatural-language search query. 1-500 characters.
topKMaximum result count. Range: 1-100.
minScoreSimilarity floor accepted by the API. Range: 0-1.
Response11 fields
countNumber of ranked results returned.
queryTimeServer-side query time in milliseconds.
results[].similarityCosine similarity score. Higher is closer.
results[].metadata.descriptionVerified Roots/NHB catalogue caption selected for display when available. NGS Art+ payload descriptions are retained in source_records, not exposed as public caption text.
results[].metadata.field_sourcesPer-field source labels, for example description: roots or title: ngs.
results[].metadata.source_provenanceSource URLs used for normalized fields, including Roots/NHB refs where a Roots caption is used.
results[].metadata.source_records.ngsOriginal NGS source payload excerpt. This is useful for catalogue fields, identifiers, credit lines, and NGS image/detail refs.
results[].metadata.source_records.rootsVerified Roots/NHB source payload excerpt. Use caption when present; it is not labelled as NGS text.
results[].metadata.generated_caption.textGenerated visual caption used for semantic retrieval/debugging. Includes model, prompt version, generated time, and source URLs.
results[].metadata.search_sourcesSearch provenance for hybrid results. Generated-caption vector hits are labelled generated_caption_embedding and source custom_metadata.generated_caption.text.
results[].metadata.classificationOptional source catalogue classification from the ingestion DB. Treat as secondary metadata, not a universal object type.
/api/v1/orgs/{orgKey}/search/imagerequires keyImage search
Multipart image search against a source's visual embeddings.
Path1 field
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
Body3 fields
imageMultipart image file. Allowed: JPEG, PNG, WebP.
topKMaximum result count. Range: 1-100.
minScoreSimilarity floor for image-vector matches. Range: 0-1.
Response11 fields
countNumber of ranked results returned.
queryTimeServer-side query time in milliseconds.
results[].similarityCosine similarity score. Higher is closer.
results[].metadata.descriptionVerified Roots/NHB catalogue caption selected for display when available. NGS Art+ payload descriptions are retained in source_records, not exposed as public caption text.
results[].metadata.field_sourcesPer-field source labels, for example description: roots or title: ngs.
results[].metadata.source_provenanceSource URLs used for normalized fields, including Roots/NHB refs where a Roots caption is used.
results[].metadata.source_records.ngsOriginal NGS source payload excerpt. This is useful for catalogue fields, identifiers, credit lines, and NGS image/detail refs.
results[].metadata.source_records.rootsVerified Roots/NHB source payload excerpt. Use caption when present; it is not labelled as NGS text.
results[].metadata.generated_caption.textGenerated visual caption used for semantic retrieval/debugging. Includes model, prompt version, generated time, and source URLs.
results[].metadata.search_sourcesSearch provenance for hybrid results. Generated-caption vector hits are labelled generated_caption_embedding and source custom_metadata.generated_caption.text.
results[].metadata.classificationOptional source catalogue classification from the ingestion DB. Treat as secondary metadata, not a universal object type.
/api/v1/orgs/{orgKey}/search/colorrequires keyColour search
Find artworks whose extracted palettes match one or more hex colours.
Path1 field
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
Body4 fields
colorsHex colours. Pattern: #RRGGBB. Min 1, max 5.
matchModeWhether any colour or every colour must match.
thresholdDeltaE distance threshold. Range: 0-30.
limitMaximum result count. Range: 1-100.
Response11 fields
countNumber of ranked results returned.
queryTimeServer-side query time in milliseconds.
results[].similarityCosine similarity score. Higher is closer.
results[].metadata.descriptionVerified Roots/NHB catalogue caption selected for display when available. NGS Art+ payload descriptions are retained in source_records, not exposed as public caption text.
results[].metadata.field_sourcesPer-field source labels, for example description: roots or title: ngs.
results[].metadata.source_provenanceSource URLs used for normalized fields, including Roots/NHB refs where a Roots caption is used.
results[].metadata.source_records.ngsOriginal NGS source payload excerpt. This is useful for catalogue fields, identifiers, credit lines, and NGS image/detail refs.
results[].metadata.source_records.rootsVerified Roots/NHB source payload excerpt. Use caption when present; it is not labelled as NGS text.
results[].metadata.generated_caption.textGenerated visual caption used for semantic retrieval/debugging. Includes model, prompt version, generated time, and source URLs.
results[].metadata.search_sourcesSearch provenance for hybrid results. Generated-caption vector hits are labelled generated_caption_embedding and source custom_metadata.generated_caption.text.
results[].metadata.classificationOptional source catalogue classification from the ingestion DB. Treat as secondary metadata, not a universal object type.
/api/v1/orgs/{orgKey}/artworks/{artworkId}requires keyArtwork lookup
Fetch one artwork record with source-labelled metadata and imagery.
Path2 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
artworkIdArtwork ID returned by search endpoints.
Body0 fields
No body fields.
Response4 fields
idArtwork identifier returned by search endpoints.
titleDisplay title from the source record.
metadata.field_sourcesPer-field source labels for normalized catalogue metadata.
metadata.source_recordsOriginal source payload excerpts used during normalization.
/api/v1/orgs/{orgKey}/collectionspublicsample onlyList collections
List collections in a source. This route is public for public sources.
Path1 field
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
Body0 fields
No body fields.
Response5 fields
data[].idCollection ID for list responses.
data.idCollection ID for single-record responses.
data.nameCollection display name.
data.artwork_countNumber of artworks currently attached to the collection.
data.thumbnail_artwork_idArtwork used as the collection thumbnail, when set.
/api/v1/orgs/{orgKey}/collectionspublicsample onlyCreate collection
Create a collection in a source. Provide an id when clients need stable collection IDs.
Path1 field
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
Body4 fields
idOptional stable collection ID. Generated when omitted.
nameCollection display name.
descriptionOptional collection description.
thumbnail_artwork_idOptional artwork ID used as the collection thumbnail.
Response5 fields
data[].idCollection ID for list responses.
data.idCollection ID for single-record responses.
data.nameCollection display name.
data.artwork_countNumber of artworks currently attached to the collection.
data.thumbnail_artwork_idArtwork used as the collection thumbnail, when set.
/api/v1/orgs/{orgKey}/collections/upsertrequires keysample onlyUpsert collection
Create or update a collection by stable id. The response includes a created flag.
Path1 field
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
Body4 fields
idOptional stable collection ID. When present, matching collections are updated.
nameCollection display name.
descriptionOptional collection description.
thumbnail_artwork_idOptional artwork ID used as the collection thumbnail.
Response3 fields
data.createdTrue when a new collection was inserted; false when updated.
data.collection.idCreated or updated collection ID.
data.collection.nameCollection display name.
/api/v1/orgs/{orgKey}/collections/{collectionId}publicsample onlyCollection lookup
Fetch one collection scoped to the source.
Path2 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
collectionIdCollection ID returned by list/create/upsert.
Body0 fields
No body fields.
Response5 fields
data[].idCollection ID for list responses.
data.idCollection ID for single-record responses.
data.nameCollection display name.
data.artwork_countNumber of artworks currently attached to the collection.
data.thumbnail_artwork_idArtwork used as the collection thumbnail, when set.
/api/v1/orgs/{orgKey}/collections/{collectionId}publicsample onlyUpdate collection
Patch collection metadata scoped to the source.
Path2 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
collectionIdCollection ID to update.
Body3 fields
nameUpdated collection display name.
descriptionUpdated collection description.
thumbnail_artwork_idUpdated thumbnail artwork ID.
Response5 fields
data[].idCollection ID for list responses.
data.idCollection ID for single-record responses.
data.nameCollection display name.
data.artwork_countNumber of artworks currently attached to the collection.
data.thumbnail_artwork_idArtwork used as the collection thumbnail, when set.
/api/v1/orgs/{orgKey}/collections/{collectionId}publicsample onlyDelete collection
Delete a collection scoped to the source.
Path2 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
collectionIdCollection ID to delete.
Body0 fields
No body fields.
Response2 fields
successWhether the delete completed successfully.
data.idDeleted or detached resource ID, when returned.
/api/v1/orgs/{orgKey}/artworks/upsertrequires keysample onlyUpsert artwork record
Create or update an artwork record by id, source record id, or accession number. The response includes a created flag.
Path1 field
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
Body17 fields
idOptional stable artwork ID.
collection_idOptional source collection/group ID.
titleArtwork title. Required when creating a new record.
artistArtist or maker display name.
yearNormalized production year.
date_textSource date text when a precise year is unavailable.
mediumMedium or materials text.
descriptionCatalogue description or caption.
accession_numberAccession or object number. Used as an upsert match key.
source_institutionInstitution or system that supplied the source record.
source_collectionSource collection name.
source_record_idSource system record ID. Used as an upsert match key.
source_urlCanonical source record URL.
image_urlPrimary artwork image URL.
thumbnail_urlThumbnail image URL.
field_sourcesOptional per-field provenance labels.
custom_metadataOptional source-specific metadata payload.
Response3 fields
data.createdTrue when a new artwork was inserted; false when updated.
data.artwork.idCreated or updated artwork ID.
data.artwork.metadataNormalized artwork metadata, including source fields.
/api/v1/orgs/{orgKey}/artworks/{artworkId}requires keysample onlyUpdate artwork
Patch artwork metadata scoped to the source.
Path2 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
artworkIdArtwork ID to update.
Body4 fields
titleUpdated artwork title.
artistUpdated artist or maker display name.
mediumUpdated medium or materials text.
descriptionUpdated catalogue description or caption.
Response4 fields
idArtwork identifier returned by search endpoints.
titleDisplay title from the source record.
metadata.field_sourcesPer-field source labels for normalized catalogue metadata.
metadata.source_recordsOriginal source payload excerpts used during normalization.
/api/v1/orgs/{orgKey}/artworks/{artworkId}requires keysample onlyDelete artwork
Soft-delete an artwork scoped to the source.
Path2 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
artworkIdArtwork ID to delete.
Body0 fields
No body fields.
Response2 fields
successWhether the delete completed successfully.
data.idDeleted or detached resource ID, when returned.
/api/v1/orgs/{orgKey}/collections/{collectionId}/artworksrequires keysample onlyAdd artwork to collection
Attach an artwork to a collection. Collection and artwork must belong to the same source.
Path2 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
collectionIdCollection ID to update.
Body2 fields
artwork_idArtwork ID from the same source.
positionSort position within the collection.
Response3 fields
data.collection_idCollection ID that was changed.
data.artwork_idArtwork ID that was added or removed.
data.positionStored position for add operations.
/api/v1/orgs/{orgKey}/collections/{collectionId}/artworks/{artworkId}requires keysample onlyRemove artwork from collection
Remove a collection membership without deleting the collection or artwork.
Path3 fields
orgKeySource key from GET /orgs. Use ngs for National Gallery Singapore.
collectionIdCollection ID to update.
artworkIdArtwork ID to remove from the collection.
Body0 fields
No body fields.
Response3 fields
data.collection_idCollection ID that was changed.
data.artwork_idArtwork ID that was added or removed.
data.positionStored position for add operations.
/api/v1/translate/textrequires keyTranslate text
Translate English catalogue text to Chinese, Malay, or Tamil.
Path0 fields
No path fields.
Body3 fields
textEnglish source text. 1-50,000 characters.
sourceLangOnly English source text is accepted.
targetLangChinese, Malay, or Tamil.
Response4 fields
translatedTextTranslated output in the requested target language.
providerTranslation provider used for the response.
cachedWhether the response came from translation cache.
usage.remainingFree translations remaining after the request, when returned.
/api/v1/extractrequires keyExtract image
Extract image objects from public image URLs. target=object is the default for preserving mounted artworks, scrolls, and visible supports. Live jobs use fal SAM3 when configured. Free accounts get 10 submitted inputs lifetime.
Path0 fields
No path fields.
Body6 fields
imageUrlsPublic image URLs. Each submitted URL or uploaded file counts against the free lifetime /extract allowance.
targetobject preserves the visible artwork object/support. content is experimental and crops tighter.
preserveFilenamesPreserve source filenames in generated outputs.
filenamePrefixOptional prefix when not preserving source names.
filenameSuffixOptional suffix when not preserving source names.
previewRequest lightweight preview outputs with the job.
Response7 fields
idExtract job ID.
statusCurrent job state.
targetRequested extract target.
counts.inputsNumber of submitted images or archive inputs.
downloadUrlZip download URL once the job is completed.
usage.remainingFree /extract inputs remaining after job creation, when returned.
warnings[]Non-fatal job warnings such as a missing worker dispatch config.
MCP client config
Point the client at /api/v1/mcp and send the same API key used for REST calls. OAuth clients can also discover protected resource metadata from /.well-known/oauth-protected-resource/api/v1/mcp.
API keys can call all exposed tools. OAuth tokens need mcp:all or matching grouped scopes such as mcp:read, mcp:write, artworks:read, collections:write, translations:create, or extract:create.
mcpServers
{
"mcpServers": {
"paillette": {
"url": "https://paillette-api-stg.berlayar.ai/api/v1/mcp",
"headers": {
"X-API-Key": "plt_stg_your_api_key"
}
}
}
}MCP tool reference
search_artworksNatural-language artwork search across a source.
search_artworksNatural-language artwork search across a source.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
queryNatural-language search query.
topKMaximum result count. Range: 1-100.
minScoreSimilarity floor. Range: 0-1.
list_orgsList source organisations and their short keys before calling search tools.
list_orgsList source organisations and their short keys before calling search tools.
limitOptional. Range: 1-100.
lookup_artworkFetch one artwork by ID with public catalogue metadata.
lookup_artworkFetch one artwork by ID with public catalogue metadata.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
artworkIdArtwork ID returned by search_artworks.
list_collectionsList collections for a source.
list_collectionsList collections for a source.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
upsert_collectionCreate or update a collection. Provide collectionId for idempotent writes.
upsert_collectionCreate or update a collection. Provide collectionId for idempotent writes.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
collectionIdOptional stable collection ID.
nameCollection display name.
descriptionOptional collection description.
thumbnailArtworkIdOptional artwork ID used as the thumbnail.
upsert_artwork_recordCreate or update artwork metadata by id, source record id, or accession number.
upsert_artwork_recordCreate or update artwork metadata by id, source record id, or accession number.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
idOptional stable artwork ID.
collectionIdOptional source collection/group ID.
titleArtwork title. Required when creating a new record.
artistArtist or maker display name.
yearNormalized production year.
mediumMedium or materials text.
descriptionCatalogue description or caption.
accessionNumberAccession or object number.
sourceRecordIdSource system record ID.
sourceUrlCanonical source record URL.
add_artwork_to_collectionAttach an artwork record to a collection in the same source.
add_artwork_to_collectionAttach an artwork record to a collection in the same source.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
collectionIdCollection ID to update.
artworkIdArtwork ID to add.
positionSort position within the collection.
remove_artwork_from_collectionDetach an artwork record from a collection without deleting the artwork.
remove_artwork_from_collectionDetach an artwork record from a collection without deleting the artwork.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
collectionIdCollection ID to update.
artworkIdArtwork ID to remove.
colour_searchFind artworks by extracted palette proximity.
colour_searchFind artworks by extracted palette proximity.
orgIdOptional source key, slug, or UUID. Use ngs for National Gallery Singapore.
collectionOptional alias for orgId.
colorsHex colours. Pattern: #RRGGBB. Min 1, max 8.
matchModeWhether any colour or every colour must match.
thresholdPalette distance threshold. Range: 0-441.7.
limitMaximum result count. Range: 1-100.
translate_textTranslate English text to Chinese, Malay, or Tamil.
translate_textTranslate English text to Chinese, Malay, or Tamil.
textEnglish source text. 1-50,000 characters.
sourceLangOptional. Only English source text is accepted.
targetLangChinese, Malay, or Tamil.
extract_imagesCreate an /extract job from image URLs. target defaults to object. Counts against the lifetime /extract allowance.
extract_imagesCreate an /extract job from image URLs. target defaults to object. Counts against the lifetime /extract allowance.
imageUrlsPublic image URLs. Min 1, max 50.
targetUse object for mounted artworks and scrolls.
preserveFilenamesPreserve source filenames in generated outputs.
returnPreviewRequest preview outputs with the job.
API keys
Sign in to create keys and run live requests.
Key management is tied to your Paillette account. The top-bar key input stays available for pasted keys.