Skip to content
中文

Search

expression accepts expressions; semantic and search accept natural language. Semantic search returns ready assets only.

Expression syntax

Guide →

Base URL and authentication

POST /media/v1/libraries/{library_id}/search/expression

Parameter Location Type Description
library_id path string Library ID

Request body

Field Type Required Description
expression string no Structured query expression; an empty expression returns every asset
sort_by object[] no Sort fields and directions
max_results integer no Up to 500; Search defaults to 100, Admin to 10
next_cursor string no Next-page cursor; null or absent at the end
with_field tags / context[] no Include tags or context
aggregate AggregateField[] no Aggregation fields
stack boolean no —

Returns: ExpressionSearchResult.

Response

HTTP 200

Successful response.

application/json

Name Type Description
total_count number Number of matching resources across pages; a lower bound when total_count_exact is false. With stack=true it counts edit trees, the rows the pages return, not the matching assets.
time number Elapsed search time in whole milliseconds.
next_cursor string Continuation token for the next page; omitted when no further page is available.
resources array<object> Assets in this page, ordered by sort_by; tags and context follow with_field.
resources[].asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
resources[].public_id string Delivery identifier unique within this library, used in asset URLs.
resources[].display_name string Human-readable asset name, independent of its delivery identifier.
resources[].asset_folder string Organizational folder path; the empty string denotes the root folder.
resources[].type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
resources[].format string Detected file format used as the delivery URL extension.
resources[].version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
resources[].version_id string Identifier for this asset version, regenerated on overwrite.
resources[].bytes number Size of the original source content, in bytes.
resources[].etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
resources[].width number Source image or video width in pixels, when known.
resources[].height number Source image or video height in pixels, when known.
resources[].duration number Source audio or video duration in seconds, when known.
resources[].pages number Number of pages recorded for the asset; omitted when no page count is stored.
resources[].audio object Detected audio track metadata, omitted when no audio track information is available.
resources[].has_audio boolean False when the video is known to contain no audio track; omitted when audio presence is unknown or an audio track exists.
resources[].original_filename string Original or overridden source filename with its final extension removed.
resources[].tags array<string> Labels attached to the asset.
resources[].context object Custom string metadata; omitted when empty or excluded by the search projection.
resources[].created_at string Time this asset identity was created, in UTC.
resources[].url string URL for retrieving this version of the asset’s original content.
resources[].secure_url string HTTPS delivery URL for this asset version; equal to url. For authenticated assets the URL carries a single-file token that expires after 15 minutes, so it is ready to use but must not be stored; keep asset_id and read the asset again. Request a delivery_tokens token for transformed URLs.
resources[].placeholder boolean False because this response represents stored source content.
resources[].existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
resources[].library_id string Identifier of the library containing this asset.
resources[].sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
resources[].status string Resource status; active identifies an asset that has not been deleted.
resources[].processing object Progress of understanding and embedding tasks for the asset.
resources[].has_alpha boolean True when the source header declares an alpha channel: a PNG color type 4 or 6 or a tRNS chunk, a WebP VP8X alpha flag or VP8L alpha bit, a WebM or MKV video track AlphaMode of 1, or a GIF transparent-color flag. False when a known container has no alpha channel. Omitted when the format is unknown, the header could not be parsed, or the asset was stored before this field existed; absence does not mean the source is opaque.
resources[].semantic string Search-vector status: pending awaits vector generation or reprocessing; ready has searchable vectors; unavailable indicates disabled, unsupported or failed embedding. Existing vectors may still serve searches while reprocessing is pending.
resources[].preview object Generated video previews, present once preview generation succeeds.
resources[].generation object Source details for the video-generation job that created this asset.
resources[].material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
resources[].audio_role string What an audio asset is used for when material_type is audio: voice, music or sfx. An audio material uploaded without a declared role gets one inferred from its content once audio understanding finishes; a declared role is never replaced. Omitted for assets that are not audio materials.
resources[].animated boolean True when an image asset contains animation, such as an animated GIF or animated WebP. Omitted for assets that are not animated images.
resources[].derived_from string | null Asset this one was edited from; null when it was generated or uploaded rather than edited. Use assets.lineage for the whole tree.
resources[].root_id string Asset at the root of this asset’s edit tree; equals asset_id when this asset is itself a root. Omitted on assets stored before this field existed.
resources[].ai_generated boolean True when the bytes carry an AI-generated content label and this asset was produced by a model. False for uploaded and imported assets.
resources[].provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
resources[].viewer_url string Console page that shows this asset in the media library: https://console.deepraxis.com/media/&#123;library_id&#125;?asset_id=&#123;asset_id&#125; (the console host carries the environment, for example console-develop on develop). Give this link to a person instead of the bare asset_id.
resources[].colors array<object> Dominant colours of an analysed image or sticker, largest share first, at most five: hex is lower-case #rrggbb and ratio is that colour’s share of the opaque pixels (0 to 1). Returned by assets.get once the visual step has run; omitted for videos, assets not yet analysed and listings.
resources[].phash string 64-bit perceptual hash of an analysed image or sticker, 16 lower-case hexadecimal characters. Two images within hamming distance 6 are the same picture re-encoded or resized. Omitted until the visual step has run.
resources[].duplicates object Other live assets in this library holding the same picture, returned by assets.get only. exact lists assets with the same bytes, oldest first; similar lists images whose perceptual hash is within distance 6 but whose bytes differ, closest first. Each list holds at most 20; the field is omitted when both are empty. Nothing is merged or blocked: decide whether to keep, delete or tag them.
resources[].used_by_elements array<string> Live elements of this library (character, product, scene or brand) whose body still names this asset as a reference picture, logo or font, returned by assets.get only. It is exactly the list the delete endpoint answers as dependents; the field is omitted when there are none. Nothing is blocked: an element keeps working until its own body stops naming the asset.
resources[].duplicate_of string On an upload or import, the earliest live asset in this library that already holds exactly these bytes. Informational only: the new asset was still created. Tell the person the library already has it and give them that asset.
resources[].stack_count number Present only when stacking was requested with stack=true on the list or the expression search: how many live assets of this asset’s edit tree match the filters or expression, this one included. Open the tree with assets.lineage to see every step.
resources[].versions array<object> Present only when the asset was read with versions=true: the current bytes first, then the versions its library kept when uploads overwrote it, newest first. Empty of kept versions when the library’s backup setting was off.
aggregations object Requested facet counts, keyed by facet name and then by field value. They count matching assets even with stack=true, unlike total_count which then counts trees.
total_count_exact boolean Whether total_count covers all matches; false indicates a bounded partial count.
aggregations_exact boolean Whether the returned facet counts cover all matching assets.
终端窗口
curl -X POST "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/search/expression" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"expression":"material_type:image AND tags=docs"}'

HTTP 200

{
"total_count": 1,
"total_count_exact": true,
"time": 208,
"resources": [
{
"asset_id": "2c25673fd03c41929a22fe860b33d920",
"public_id": "docs/pixel",
"display_name": "Sample image",
"asset_folder": "examples",
"type": "authenticated",
"format": "png",
"version": 1794550605,
"version_id": "8b9feb1e071f40858396419a66a4d512",
"bytes": 403,
"etag": "3506470cee1eb3f6ce4df4767d0cfef8",
"width": 128,
"height": 128,
"original_filename": "file",
"created_at": "2026-11-13T06:16:45.114Z",
"url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550609%7Eexp%3D1794551509%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3De6d89fb9f32efc445d747dc49d2a7a84768085a13b9c421466dadb8e6d66e324",
"secure_url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550609%7Eexp%3D1794551509%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3De6d89fb9f32efc445d747dc49d2a7a84768085a13b9c421466dadb8e6d66e324",
"placeholder": false,
"library_id": "lib_200f2b495e5f456194e746d66a3a8999",
"sha256": "9b5d2bc0516a2749576352b9c38c6e9f88d2db423d8a187c1c003034b2136b3c",
"status": "active",
"processing": {
"state": "pending",
"kinds": {
"visual": "pending",
"embedding": "pending"
},
"updated_at": "2026-11-13T06:16:45.114Z"
},
"semantic": "pending",
"has_alpha": false,
"material_type": "image",
"root_id": "2c25673fd03c41929a22fe860b33d920",
"viewer_url": "https://console.deepraxis.com/media/lib_200f2b495e5f456194e746d66a3a8999?asset_id=2c25673fd03c41929a22fe860b33d920"
}
]
}

POST /media/v1/libraries/{library_id}/search/visual

Parameter Location Type Description
library_id path string Library ID

Request body

Field Type Required Description
asset_id AssetId no Asset ID
image object no Query image object: base64 data and image MIME type
top_k integer no Maximum hits, 1–50
filter string no Expression filter

Returns: SemanticSearchResult.

Available when library search.image is true; unsupported libraries return LIBRARY_INVALID_STATE. JPEG, PNG, WebP and GIF are accepted, with a maximum decoded size of 10 MiB. Each asset returns its highest-scoring match; videos identify the best frame. qwen3-vl-embedding uses 0.35 for image similarity. Measurements on 2026-10-10: variants of the same image scored 0.82–0.96, similar scenes 0.38–0.66, and unrelated images at most 0.34.

Provide exactly one of asset_id or image: { data, mime }. Asset queries reuse existing image understanding and exclude the source asset; videos use the first frame. Incomplete understanding returns LIBRARY_INVALID_STATE. Uploaded image data is base64. top_k defaults to 20 and accepts 1–50; filter uses the semantic-search expression syntax. Only image similarity is searched. The response shares semantic search’s hits, embedding_producer and not_ready_excluded fields. matches.kind is image; snippet uses the latest caption or asset name. Deleted assets, old versions and replaced understanding are excluded.

Response

HTTP 200

Successful response.

application/json

Name Type Description
hits array<object> Ranked assets up to top_k; an empty array means no eligible matches were found.
hits[].asset object Asset matched by the query.
hits[].score number Ranking score: cosine similarity for semantic or visual search; normalized rank-fusion score for hybrid search. Higher values rank first; hybrid scores are not probabilities or confidence.
hits[].semantic_score number | null Cosine similarity for hybrid hits with a semantic match; null for keyword-only hybrid hits. Omitted outside hybrid mode.
hits[].matches array<object> Supporting content or metadata matches contributing to this asset’s hit.
hits[].similar_count number How many other assets in this library matched as the same footage (the same file, or another export of the same Cut project) and were folded into this hit.
hits[].similar_asset_ids array<string> Asset ids folded into this hit, up to 10.
embedding_producer string Embedding model identifier used for the query, or for the source asset embedding in an asset-based visual query.
not_ready_excluded number Number of distinct candidate asset identifiers, or unresolved vector identifiers, excluded because their vectors or assets were missing, deleted or stale; not a count of all pending assets in the library.

POST /media/v1/libraries/{library_id}/search/semantic

Parameter Location Type Description
library_id path string Library ID

Request body

Field Type Required Description
query string yes Describe what you want to find
filter string no Expression filter
top_k integer no Maximum hits, 1–50
mode hybrid / semantic no hybrid combines keywords and semantics; semantic uses semantics only
material_type MaterialType no —

Returns: SemanticSearchResult.

With bge-m3, vector candidates must have cosine similarity ≥ 0.55 before keyword fusion, including newly understood content. Calibration on seven demo assets on 2026-10-09 found relevant results at approximately 0.58 or higher (0.581–0.729), irrelevant results at most 0.523, and wholly unrelated queries at most 0.478. qwen3-vl-embedding text queries use 0.40 against text content (captions, transcripts) and 0.25 against image content. Other models remain uncalibrated and unfiltered. Keyword matches are unaffected. Queries unrelated to the library return an empty list; mode=semantic returns only results meeting the vector threshold.

Response

HTTP 200

Successful response.

application/json

Name Type Description
hits array<object> Ranked assets up to top_k; an empty array means no eligible matches were found.
hits[].asset object Asset matched by the query.
hits[].score number Ranking score: cosine similarity for semantic or visual search; normalized rank-fusion score for hybrid search. Higher values rank first; hybrid scores are not probabilities or confidence.
hits[].semantic_score number | null Cosine similarity for hybrid hits with a semantic match; null for keyword-only hybrid hits. Omitted outside hybrid mode.
hits[].matches array<object> Supporting content or metadata matches contributing to this asset’s hit.
hits[].similar_count number How many other assets in this library matched as the same footage (the same file, or another export of the same Cut project) and were folded into this hit.
hits[].similar_asset_ids array<string> Asset ids folded into this hit, up to 10.
embedding_producer string Embedding model identifier used for the query, or for the source asset embedding in an asset-based visual query.
not_ready_excluded number Number of distinct candidate asset identifiers, or unresolved vector identifiers, excluded because their vectors or assets were missing, deleted or stale; not a count of all pending assets in the library.
终端窗口
curl -X POST "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/search/semantic" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"query":"a small image","top_k":5}'

HTTP 200

{
"hits": [],
"embedding_producer": "qwen3-vl-embedding",
"not_ready_excluded": 0
}

Semantic search alias

POST /media/v1/libraries/{library_id}/search

Parameter Location Type Description
library_id path string Library ID

Request body

Field Type Required Description
query string yes Describe what you want to find
filter string no Expression filter
top_k integer no Maximum hits, 1–50
mode hybrid / semantic no hybrid combines keywords and semantics; semantic uses semantics only
material_type MaterialType no —

Returns: SemanticSearchResult.

Response

HTTP 200

Successful response.

application/json

Name Type Description
hits array<object> Ranked assets up to top_k; an empty array means no eligible matches were found.
hits[].asset object Asset matched by the query.
hits[].score number Ranking score: cosine similarity for semantic or visual search; normalized rank-fusion score for hybrid search. Higher values rank first; hybrid scores are not probabilities or confidence.
hits[].semantic_score number | null Cosine similarity for hybrid hits with a semantic match; null for keyword-only hybrid hits. Omitted outside hybrid mode.
hits[].matches array<object> Supporting content or metadata matches contributing to this asset’s hit.
hits[].similar_count number How many other assets in this library matched as the same footage (the same file, or another export of the same Cut project) and were folded into this hit.
hits[].similar_asset_ids array<string> Asset ids folded into this hit, up to 10.
embedding_producer string Embedding model identifier used for the query, or for the source asset embedding in an asset-based visual query.
not_ready_excluded number Number of distinct candidate asset identifiers, or unresolved vector identifiers, excluded because their vectors or assets were missing, deleted or stale; not a count of all pending assets in the library.
终端窗口
curl -X POST "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/search" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"query":"sample","top_k":5}'

HTTP 200

{
"hits": [
{
"asset": {
"asset_id": "0b189e47017149e5aea17955ada66d31",
"public_id": "examples/pixel",
"display_name": "pixel",
"asset_folder": "examples",
"type": "authenticated",
"format": "png",
"version": 1794550628,
"version_id": "eeb9e19cde004f5db8676dbf6d07ac7c",
"bytes": 403,
"etag": "3506470cee1eb3f6ce4df4767d0cfef8",
"width": 128,
"height": 128,
"original_filename": "file",
"tags": [
"docs"
],
"context": {
"custom": {
"alt": "sample"
}
},
"created_at": "2026-11-13T06:17:08.615Z",
"url": "https://media.praxisusercontent.com/lib_ab7c545e85994e108974c89aa2078cf8/image/authenticated/v1794550628/examples/pixel.png?__cld_token__=st%3D1794550633%7Eexp%3D1794551533%7Eacl%3D%252Flib_ab7c545e85994e108974c89aa2078cf8%252Fimage%252Fauthenticated%252Fv1794550628%252Fexamples%252Fpixel.png%7Ehmac%3D144fc3f86c3cf47f26e16411a2cd2dd7cbab34bcc953c808331eeead89cb2421",
"secure_url": "https://media.praxisusercontent.com/lib_ab7c545e85994e108974c89aa2078cf8/image/authenticated/v1794550628/examples/pixel.png?__cld_token__=st%3D1794550633%7Eexp%3D1794551533%7Eacl%3D%252Flib_ab7c545e85994e108974c89aa2078cf8%252Fimage%252Fauthenticated%252Fv1794550628%252Fexamples%252Fpixel.png%7Ehmac%3D144fc3f86c3cf47f26e16411a2cd2dd7cbab34bcc953c808331eeead89cb2421",
"placeholder": false,
"library_id": "lib_ab7c545e85994e108974c89aa2078cf8",
"sha256": "9b5d2bc0516a2749576352b9c38c6e9f88d2db423d8a187c1c003034b2136b3c",
"status": "active",
"processing": {
"state": "pending",
"kinds": {
"visual": "pending",
"embedding": "pending"
},
"updated_at": "2026-11-13T06:17:08.615Z"
},
"semantic": "pending",
"has_alpha": false,
"material_type": "image",
"root_id": "0b189e47017149e5aea17955ada66d31",
"viewer_url": "https://console.deepraxis.com/media/lib_ab7c545e85994e108974c89aa2078cf8?asset_id=0b189e47017149e5aea17955ada66d31"
},
"score": 1,
"matches": [
{
"kind": "metadata",
"understanding_id": null,
"segment": null,
"snippet": "pixel"
}
],
"semantic_score": null
}
],
"embedding_producer": "qwen3-vl-embedding",
"not_ready_excluded": 0
}

ExpressionSearchResult

Field Type Required Description
total_count number yes Matching count
time number yes Search time in whole milliseconds, measured by the service
next_cursor string no Next-page cursor; null or absent at the end
resources SearchAsset[] yes Assets in this page
aggregations object no Counts by requested fields
total_count_exact boolean no Whether the count is exact
aggregations_exact boolean no Whether aggregations are exact

SemanticSearchResult

Field Type Required Description
hits SemanticHit[] yes Search hits
embedding_producer string yes Semantic understanding producer
not_ready_excluded number yes Assets excluded because they are not ready

SearchAsset

Field Type Required Description
asset_id AssetId yes Asset ID
public_id string yes Asset name in delivery URLs; may contain path segments
display_name string yes Display name
asset_folder string yes Organizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
type DeliveryType yes Resource or event type
format string yes File format
version number yes Delivery version
version_id string yes Version identifier
bytes number yes File size in bytes
etag string yes File checksum
width number no Width in pixels
height number no Height in pixels
duration number no Duration in seconds
pages number no Document pages
audio object no —
has_audio false no —
original_filename string no Original file name
tags string[] no Asset tags. Uploads accept a comma-separated string (items trimmed, empty items dropped), an array, or repeated tags fields; PATCH accepts an array only and replaces the whole list
context object no Custom text key/value pairs; PATCH replaces the whole map, {} clears it
created_at IsoTimestamp yes Creation time
url string yes Original-file URL
secure_url string yes HTTPS delivery URL
placeholder false yes Always false
existing boolean no Whether an existing asset was returned without overwrite
library_id LibraryId yes Library ID
sha256 string yes Content checksum
status "active" yes Resource status
processing Processing yes Overall and per-kind processing states
has_alpha boolean no —
semantic "pending" / "ready" / "unavailable" yes Searchable semantically when ready
preview object no Preview poster and storyboard
generation object no —
material_type MaterialType yes —
audio_role AudioRole no —
animated true no —
derived_from AssetId / null no —
root_id AssetId no —
ai_generated boolean no —
provenance Provenance / RecordingProvenance no —
viewer_url string no —
colors AssetColor[] no —
phash string no —
duplicates AssetDuplicates no —
used_by_elements AssetId[] no —
duplicate_of AssetId no —
stack_count number no —
versions AssetVersion[] no —

SemanticHit

Field Type Required Description
asset Asset yes Matching asset
score number yes Relevance score
semantic_score number / null no —
matches SemanticMatch[] yes Matched content and segment times
similar_count number no —
similar_asset_ids string[] no —

SemanticMatch

Field Type Required Description
kind UnderstandingKind / "metadata" / "image" yes Understanding or processing kind; filters the understanding list
understanding_id UnderstandingId / null yes Understanding ID; null for metadata matches
segment Segment / null yes Start/end milliseconds; null for whole assets
snippet string yes Matching text snippet