Asset search

Search a project's assets by keyword or natural language, such as “a red car at night”. Matches use image content, spoken audio, and sampled video scenes and speech Preview.

Search through the API

Search assets

Search accessible assets by keyword or natural language. Images are indexed automatically; enable audio and video search in project settings to include those media types. Results are the best `pageSize` matches (at most 20), ranked by relevance, so this endpoint has no cursor: refine the query, or list assets with a filter, to see more.

OpenAPI YAML
GET
https://api.calmlens.com/v1/projects/
/assets/search
const response = await client.assets.search({
  "query": "a red car at night",
  "mode": "hybrid",
  "pageSize": 10
});

Query Parameters

Edit any value to update the generated request examples.

string
number
How many of the best matches to return, 1 to 20
ModeEnum
Allowed values
keywordsemantichybrid

Response

querystring
semanticStatusSemanticStatusEnum
Allowed values
disabledreadyindexingunavailable

Error Codes

401api-key/missing
Authentication required. Send your project API key in the X-Api-Key header.
401api-key/invalid
The API key is invalid, revoked or expired. Create a key under Developer → API Keys.
403api-key/project-mismatch
This API key belongs to a different project. Use a key created for the project that owns this resource.
403auth/permission-denied
This API key lacks a permission the request needs (details.permission names it, such as assets:download for an asset's folder), or the resource belongs to another project.
400validation/invalid-request
The request's parameters, query or body are invalid. details.issues lists each problem, with its path and issue code.
404project/not-found
Project not found
503search/unavailable
Search is temporarily unavailable. Retry later.
500server/internal-error
An internal error occurred. Retry later, and quote requestId to support.

API keys must belong to the project and have View assets (assets:read). Keyword matches and semantic matches use different relevance scores; compare scores only within the same matching method and query.

The mode parameter chooses how to match: keyword, semantic, or hybrid (the default), which combines both. Keyword requests are free. If you call search as someone types, wait for a pause in typing before sending a semantic or hybrid request, since each completed semantic query is billed.

What is indexed

Keyword search matches every word of the query against an asset's name, ID, externalId, description, tags, type, format, extension and moderation status. It covers every asset the caller can see, whatever its moderation status.

Content search works for images in every project without setup: images whose content is retained, with a decision of allowed, limited or age-restricted and no safety or copyright hold, are indexed automatically, including existing assets, at no charge. Text content isn't indexed for content search: text, document and website assets are found by keyword search on the fields above. Audio and video search is optional and billed per project; see Turn on audio and video search. An asset is indexed once its moderation decision is made, and content search typically finds it within a minute of that decision; keyword search finds it at once. Hourly reconciliation repairs missing entries and retries failed indexing.

Audio and video must be at most 120 seconds and 50 MiB. Video uses one frame every ten seconds plus its speech transcript. Brief scenes between samples can be missed. Audio search covers speech, not music, sound effects or speaker identification. Results identify the asset; they do not point to a timestamp. Silent audio has no semantic result but remains searchable by keyword.

Image previews, sampled video frames, speech transcripts and queries are embedded into a shared vector space, and audio and video speech is transcribed first. The index stores vectors and content revisions, not another media copy. Derived vectors are removed when you remove content, delete an asset or delete its project. All results respect the caller's current project and folder access. Content matches leave out assets that stop qualifying for the index, such as blocked, purged, safety-held and removed content; keyword matches don't.

Availability

Keyword search uses no AI service. semanticStatus: "disabled" is returned for mode=keyword requests; no paid query is recorded. indexing means content matches may be missing: none of the project's assets has been indexed yet, or recently indexed assets aren't searchable yet. ready means every asset indexed so far can be found by content. If the semantic service is unavailable, hybrid search returns keyword results with semanticStatus: "unavailable"; semantic-only search returns no semantic results.

Usage and billing

Search queries

Each completed semantic query in semantic or hybrid mode costs £0.06 per 1,000 searches and records one asset_search unit against the project's organisation, across images, audio and video, including queries with no matches. Failed semantic queries, keyword-only requests, indexing and repairs do not count as paid searches.

Media indexing

With audio and video search turned on, indexing costs £3.00 per 1,000 indexing units, with one asset_media_search_indexing unit per started six seconds of audio or video. Each retained content revision is charged once, even if the library is never searched. Replacing content creates a new charge; automatic repairs, unsupported media and failed indexing attempts do not.

View totals in Portal › Project usage. See Pricing for every meter and its free allowance.

Audio and video searchPreview

Turn on AI Video & Audio Indexing, the project setting for audio and video search, after reviewing its initial indexing estimate. You need settings:write. The estimate covers audio and video that has not already been billed, assuming the supported two-minute maximum per file. Actual charges depend on duration; see Pricing. If the library grows before you save, the estimate is refreshed and you need to confirm again.

Turning it off stops new media indexing and removes audio and video from the project’s search index. Images stay searchable. Turning it back on rebuilds the media index without charging already billed revisions again.

Last updated

Signing in

Signing out

Cookies on CalmLens

We use essential cookies for sign-in and security. With your permission, functional cookies remember your preferences and Google Analytics measures website use and signups. Optional ad measurement cookies link Google ad clicks to signups. Personalised advertising stays off. Manage cookies