Get a cached preview of a value
GET /Platform/dtypes/{dtype_hash}/preview
Get a cached preview of a value. The preview is bytes-free.
Reads cached preview fields (waveform, thumbnail, header) directly from
the KV store — never calls to_bytes() on the raw data key. When
force=True triggers a one-time compute for missing fields so the
next request serves from cache.
Audio, image, PDF and file previews also carry media_url: a signed
link a browser <audio>/<img> element or a new tab can load
directly (audio as mp3, seekable), bound to the organization this
request acted in (an element or a new tab cannot send the org header
itself). Whoever holds it can load the value for one hour.
Path parameters
dtype_hash: str. The handle.
Query parameters
force: optional bool. Compute missing preview fields now (slower once, cached afterwards).
Returns
DtypePreview
hash: str. The dtype handle.dtype: str. Dtype name.content_type: optional str or null. Media type of the value.size: optional int or null. Byte length, when cached.needs_compute: optional bool. Whether some preview fields are not cached yet.missing: optional List[str] or null. Preview fields still to compute.failure: optional str or null. Why no preview could be built (unsupported dtype or load failure); fall back to get_dtype.audio: optional AudioPreview or null. Audio facts, for audio.image: optional ImagePreview or null. Image facts, for images.pdf: optional PdfPreview or null. PDF facts, for PDFs.file: optional FilePreview or null. File facts, for files.media_url: optional str or null. For audio, images, PDFs and files: a signed URL a browser element or new tab can load directly (mp3 for audio, with Range requests for seeking), bound to the organization the request acted in. A bearer link valid for one hour; null for other dtypes.
Example request
curl -X GET "https://api.hilus.ai/Platform/dtypes/{dtype_hash}/preview" \
-H "Authorization: Bearer $HILUS_API_KEY"