跳转到内容
EN

素材

指南 →

基础地址与鉴权

创建取帧链接

POST /media/v1/libraries/{library_id}/assets/{asset_id}/frames

参数 位置 类型 说明
library_id path string 库 ID
asset_id path string 素材 ID

请求体

字段 类型 必填 说明
at_micros integer[] 是 —
width 160 / 320 / 640 否 宽度像素

返回: FrameUrls.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
frames array<object> Frame links in the same order as the requested timestamps, including duplicates.
frames[].at_micros integer Requested time in microseconds from the start of the video.
frames[].url string JPEG delivery URL. Fetch it to extract the frame; authenticated links carry a bearer token and must not be shared beyond intended readers.
frames[].expires_at string UTC expiry for authenticated frame links, 300 seconds after issuance. Upload asset links remain public and permanent; this timestamp does not expire those URLs.

列出素材

GET /media/v1/libraries/{library_id}/assets

参数 位置 类型 说明
library_id path string 库 ID
asset_folder query string 组织文件夹;不改变 public_id。按它列出时只匹配这一层、不含子文件夹;空字符串表示根
material_type query MaterialType —
live_stream_id query string —
stack query boolean —
cursor query string 上一页的 next_cursor
limit query integer 每页 1–200 条,默认 50

返回: AssetPage.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
data array<object> Assets in this page, ordered by creation time descending.
data[].asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
data[].public_id string Delivery identifier unique within this library, used in asset URLs.
data[].display_name string Human-readable asset name, independent of its delivery identifier.
data[].asset_folder string Organizational folder path; the empty string denotes the root folder.
data[].type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
data[].format string Detected file format used as the delivery URL extension.
data[].version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
data[].version_id string Identifier for this asset version, regenerated on overwrite.
data[].bytes number Size of the original source content, in bytes.
data[].etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
data[].width number Source image or video width in pixels, when known.
data[].height number Source image or video height in pixels, when known.
data[].duration number Source audio or video duration in seconds, when known.
data[].pages number Number of pages recorded for the asset; omitted when no page count is stored.
data[].audio object Detected audio track metadata, omitted when no audio track information is available.
data[].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.
data[].original_filename string Original or overridden source filename with its final extension removed.
data[].tags array<string> Labels attached to the asset.
data[].context object Custom string metadata; omitted when empty or excluded by the search projection.
data[].created_at string Time this asset identity was created, in UTC.
data[].url string URL for retrieving this version of the asset’s original content.
data[].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.
data[].placeholder boolean False because this response represents stored source content.
data[].existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
data[].library_id string Identifier of the library containing this asset.
data[].sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
data[].status string Resource status; active identifies an asset that has not been deleted.
data[].processing object Progress of understanding and embedding tasks for the asset.
data[].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.
data[].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.
data[].preview object Generated video previews, present once preview generation succeeds.
data[].generation object Source details for the video-generation job that created this asset.
data[].material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
data[].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.
data[].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.
data[].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.
data[].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.
data[].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.
data[].provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
data[].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.
data[].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.
data[].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.
data[].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.
data[].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.
data[].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.
data[].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.
data[].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.
next_cursor string | null Opaque token to pass as cursor to listAssets; null means no further page.
终端窗口
curl -X GET "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets" \
-H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
"data": [
{
"asset_id": "2c25673fd03c41929a22fe860b33d920",
"public_id": "docs/pixel",
"display_name": "pixel",
"asset_folder": "examples",
"type": "authenticated",
"format": "png",
"version": 1794550605,
"version_id": "8b9feb1e071f40858396419a66a4d512",
"bytes": 403,
"etag": "3506470cee1eb3f6ce4df4767d0cfef8",
"width": 128,
"height": 128,
"original_filename": "file",
"tags": [
"docs"
],
"created_at": "2026-11-13T06:16:45.114Z",
"url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550606%7Eexp%3D1794551506%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3D121ee02fe7acb87451b2f9d723d408e66670701c1b6d1cf9983cb164b7850869",
"secure_url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550606%7Eexp%3D1794551506%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3D121ee02fe7acb87451b2f9d723d408e66670701c1b6d1cf9983cb164b7850869",
"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"
}
],
"next_cursor": null
}

上传素材

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

参数 位置 类型 说明
library_id path string 库 ID
X-Unique-Upload-Id header string —
Content-Range header string —

请求体

字段 类型 必填 说明
file string / string 是 文件字节、HTTPS URL、data URI 或同账户 file_…
public_id string 否 交付地址中的素材名称,可带路径
public_id_prefix string 否 public_id 的路径前缀;末尾的 / 可有可无,前缀与 ID 之间只保留一个 /
display_name string 否 显示名称
asset_folder string 否 组织文件夹;不改变 public_id。按它列出时只匹配这一层、不含子文件夹;空字符串表示根
use_filename boolean 否 用文件名生成 public_id
unique_filename boolean 否 自动附加唯一后缀
use_filename_as_display_name boolean 否 用文件名作为显示名称
filename_override string 否 覆盖原文件名称
overwrite boolean 否 是否覆盖同名素材
tags string / string[] 否 素材标签。上传可传逗号分隔字符串(每项去首尾空白、丢弃空项)、数组或重复的 tags 字段;PATCH 只接受数组并整体替换
context string / object 否 自定义文字键值;PATCH 整体替换,传 {} 清空
auto_tagging number 否 理解后将达到阈值的标签合并;0–1
type DeliveryType 否 资源或事件类型

返回: Asset.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
public_id string Delivery identifier unique within this library, used in asset URLs.
display_name string Human-readable asset name, independent of its delivery identifier.
asset_folder string Organizational folder path; the empty string denotes the root folder.
type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
format string Detected file format used as the delivery URL extension.
version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
version_id string Identifier for this asset version, regenerated on overwrite.
bytes number Size of the original source content, in bytes.
etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
width number Source image or video width in pixels, when known.
height number Source image or video height in pixels, when known.
duration number Source audio or video duration in seconds, when known.
pages number Number of pages recorded for the asset; omitted when no page count is stored.
audio object Detected audio track metadata, omitted when no audio track information is available.
audio.codec string Detected audio codec identifier, when known.
audio.channels number Number of audio channels in the detected track, when known.
audio.frequency number Audio sampling frequency in hertz, when known.
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.
original_filename string Original or overridden source filename with its final extension removed.
tags array<string> Labels attached to the asset.
context object Custom string metadata; omitted when empty or excluded by the search projection.
context.custom object Caller-supplied metadata entries with string values.
created_at string Time this asset identity was created, in UTC.
url string URL for retrieving this version of the asset’s original content.
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.
placeholder boolean False because this response represents stored source content.
existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
library_id string Identifier of the library containing this asset.
sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
status string Resource status; active identifies an asset that has not been deleted.
processing object Progress of understanding and embedding tasks for the asset.
processing.stage string | null Current understanding stage: probe, proxy, frames, shots, visual, transcript, transcript_reference, transcript_correction, audio_profile, overview, embedding or finalize. proxy prepares the proxies a large source is understood through. Null after finalization; omitted on assets not yet dispatched.
processing.state string Aggregate processing state across the asset processing tasks.
processing.kinds object Processing states by kind. tagging is present when auto_tagging was requested and follows visual understanding.
processing.updated_at string Time the processing state was last updated, in UTC.
processing.progress object Progress inside the current stage, as {done, total}. Present only while stage is transcript or transcript_reference (counted in audio windows) or transcript_correction (counted in correction batches); cleared when the stage changes.
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.
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.
preview object Generated video previews, present once preview generation succeeds.
preview.poster_url string Delivery URL of the video’s first-frame poster, an image you can open directly. In an authenticated library it is a signed link that expires about 15 minutes after the asset is read; retrieve the asset again for a fresh one.
preview.storyboard object Preview sprite sheet with tile dimensions and sample spacing.
preview.proxy object Low-bitrate proxy renditions for smooth playback while editing; exports use the original source.
generation object Source details for the video-generation job that created this asset.
generation.job_id string Job id that generated this asset.
generation.intent string Generation intent used to create the asset; v1 supports video.generate.
generation.prompt string Text prompt submitted for the generation job.
generation.model string Video-generation model that produced the asset.
material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
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.
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.
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.
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.
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.
provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
provenance.job_id string Generation or edit job that produced this asset; read it with assets and jobs to follow the operation.
provenance.operation string The generation or edit operation that produced this asset.
provenance.prompt string Prompt submitted for this operation, when the operation used one. Omitted for operations without a prompt, such as a plain edit.
provenance.parameters object The generation parameters this asset was made with, recorded from the normalised request the job ran. Its kind says which parameters follow. Omitted on assets written before parameters were recorded; absent never means a default was used.
provenance.references array<object> Assets this result was generated or edited from, each with the role it played. Empty when the operation used no reference asset.
provenance.model string Model that performed the operation, as the model identifier returned by the model API.
provenance.tier string The performance tier that actually performed the operation, present only when the request named a tier instead of a model: the tier that really served it, paired with model.
provenance.elements array<object> Reusable elements (characters, products, scenes, brands) this generation expanded, each with the version read when the job was created. The service replaced each element in references with its own pictures and appended its written guidance to the prompt; references above lists the pictures the model actually received. Omitted when the request named no element.
provenance.cost object The part of the generation job’s charge that belongs to this asset, as US dollars in a decimal string with six decimals. A job that produced several outputs from one model call shares that charge between them. Omitted on assets the platform did not charge for and on assets whose charge was not recorded.
provenance.actor object Who started the operation this asset came from.
provenance.pipeline_run_id string Automation run that performed the operation, when it came from a pipeline. Omitted when no pipeline was involved.
provenance.kind string Always live_recording; it tells this record apart from the provenance of a generated or edited asset.
provenance.live_stream_id string Identifier of the live stream that was recorded (mst_ followed by 26 characters). List a library’s assets with live_stream_id to find every recording of one stream.
provenance.broadcast_started_at string When the recorded broadcast began, as an RFC 3339 UTC timestamp. A stream recorded in several broadcasts has one asset per broadcast, each with its own start.
provenance.broadcast_ended_at string When the recorded broadcast ended, as an RFC 3339 UTC timestamp.
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.
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.
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.
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.
duplicates.exact array<string> Assets holding exactly the same bytes, oldest first, at most 20.
duplicates.similar array<string> Images whose perceptual hash is within distance 6 but whose bytes differ (resized or re-encoded), closest first, at most 20.
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.
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.
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.
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.
done boolean False while more chunks are needed before the asset is complete. / True when the final chunk has completed the asset upload.
upload_id string Upload session identifier supplied in X-Unique-Upload-Id; reuse it for subsequent chunks.
终端窗口
curl -X POST "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"file":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAABWklEQVR4nO3OQQ0AMBAEofVv+iqDxzRBALvtg/wgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwgzg/i/CDOD+L8IM4P4vwg7gEgaMOyrMtNTwAAAABJRU5ErkJggg==","public_id":"examples/pixel","asset_folder":"examples","tags":["docs"],"context":"alt=sample"}'

HTTP 200

{
"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%3D1794550628%7Eexp%3D1794551528%7Eacl%3D%252Flib_ab7c545e85994e108974c89aa2078cf8%252Fimage%252Fauthenticated%252Fv1794550628%252Fexamples%252Fpixel.png%7Ehmac%3Dc4792586115372324b2d8a1c0c857814577902592c317696745737599ed352ad",
"secure_url": "https://media.praxisusercontent.com/lib_ab7c545e85994e108974c89aa2078cf8/image/authenticated/v1794550628/examples/pixel.png?__cld_token__=st%3D1794550628%7Eexp%3D1794551528%7Eacl%3D%252Flib_ab7c545e85994e108974c89aa2078cf8%252Fimage%252Fauthenticated%252Fv1794550628%252Fexamples%252Fpixel.png%7Ehmac%3Dc4792586115372324b2d8a1c0c857814577902592c317696745737599ed352ad",
"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"
}

导入文件

POST /media/v1/libraries/{library_id}/assets/import

参数 位置 类型 说明
library_id path string 库 ID

请求体

字段 类型 必填 说明
file_id string 是 同账户文件 ID
public_id string 否 交付地址中的素材名称,可带路径
public_id_prefix string 否 public_id 的路径前缀;末尾的 / 可有可无,前缀与 ID 之间只保留一个 /
display_name string 否 显示名称
asset_folder string 否 组织文件夹;不改变 public_id。按它列出时只匹配这一层、不含子文件夹;空字符串表示根
use_filename boolean 否 用文件名生成 public_id
unique_filename boolean 否 自动附加唯一后缀
use_filename_as_display_name boolean 否 用文件名作为显示名称
filename_override string 否 覆盖原文件名称
overwrite boolean 否 是否覆盖同名素材
tags string / string[] 否 素材标签。上传可传逗号分隔字符串(每项去首尾空白、丢弃空项)、数组或重复的 tags 字段;PATCH 只接受数组并整体替换
context string / object 否 自定义文字键值;PATCH 整体替换,传 {} 清空
auto_tagging number 否 理解后将达到阈值的标签合并;0–1
type DeliveryType 否 资源或事件类型

返回: Asset.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
public_id string Delivery identifier unique within this library, used in asset URLs.
display_name string Human-readable asset name, independent of its delivery identifier.
asset_folder string Organizational folder path; the empty string denotes the root folder.
type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
format string Detected file format used as the delivery URL extension.
version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
version_id string Identifier for this asset version, regenerated on overwrite.
bytes number Size of the original source content, in bytes.
etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
width number Source image or video width in pixels, when known.
height number Source image or video height in pixels, when known.
duration number Source audio or video duration in seconds, when known.
pages number Number of pages recorded for the asset; omitted when no page count is stored.
audio object Detected audio track metadata, omitted when no audio track information is available.
audio.codec string Detected audio codec identifier, when known.
audio.channels number Number of audio channels in the detected track, when known.
audio.frequency number Audio sampling frequency in hertz, when known.
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.
original_filename string Original or overridden source filename with its final extension removed.
tags array<string> Labels attached to the asset.
context object Custom string metadata; omitted when empty or excluded by the search projection.
context.custom object Caller-supplied metadata entries with string values.
created_at string Time this asset identity was created, in UTC.
url string URL for retrieving this version of the asset’s original content.
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.
placeholder boolean False because this response represents stored source content.
existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
library_id string Identifier of the library containing this asset.
sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
status string Resource status; active identifies an asset that has not been deleted.
processing object Progress of understanding and embedding tasks for the asset.
processing.stage string | null Current understanding stage: probe, proxy, frames, shots, visual, transcript, transcript_reference, transcript_correction, audio_profile, overview, embedding or finalize. proxy prepares the proxies a large source is understood through. Null after finalization; omitted on assets not yet dispatched.
processing.state string Aggregate processing state across the asset processing tasks.
processing.kinds object Processing states by kind. tagging is present when auto_tagging was requested and follows visual understanding.
processing.updated_at string Time the processing state was last updated, in UTC.
processing.progress object Progress inside the current stage, as {done, total}. Present only while stage is transcript or transcript_reference (counted in audio windows) or transcript_correction (counted in correction batches); cleared when the stage changes.
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.
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.
preview object Generated video previews, present once preview generation succeeds.
preview.poster_url string Delivery URL of the video’s first-frame poster, an image you can open directly. In an authenticated library it is a signed link that expires about 15 minutes after the asset is read; retrieve the asset again for a fresh one.
preview.storyboard object Preview sprite sheet with tile dimensions and sample spacing.
preview.proxy object Low-bitrate proxy renditions for smooth playback while editing; exports use the original source.
generation object Source details for the video-generation job that created this asset.
generation.job_id string Job id that generated this asset.
generation.intent string Generation intent used to create the asset; v1 supports video.generate.
generation.prompt string Text prompt submitted for the generation job.
generation.model string Video-generation model that produced the asset.
material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
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.
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.
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.
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.
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.
provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
provenance.job_id string Generation or edit job that produced this asset; read it with assets and jobs to follow the operation.
provenance.operation string The generation or edit operation that produced this asset.
provenance.prompt string Prompt submitted for this operation, when the operation used one. Omitted for operations without a prompt, such as a plain edit.
provenance.parameters object The generation parameters this asset was made with, recorded from the normalised request the job ran. Its kind says which parameters follow. Omitted on assets written before parameters were recorded; absent never means a default was used.
provenance.references array<object> Assets this result was generated or edited from, each with the role it played. Empty when the operation used no reference asset.
provenance.model string Model that performed the operation, as the model identifier returned by the model API.
provenance.tier string The performance tier that actually performed the operation, present only when the request named a tier instead of a model: the tier that really served it, paired with model.
provenance.elements array<object> Reusable elements (characters, products, scenes, brands) this generation expanded, each with the version read when the job was created. The service replaced each element in references with its own pictures and appended its written guidance to the prompt; references above lists the pictures the model actually received. Omitted when the request named no element.
provenance.cost object The part of the generation job’s charge that belongs to this asset, as US dollars in a decimal string with six decimals. A job that produced several outputs from one model call shares that charge between them. Omitted on assets the platform did not charge for and on assets whose charge was not recorded.
provenance.actor object Who started the operation this asset came from.
provenance.pipeline_run_id string Automation run that performed the operation, when it came from a pipeline. Omitted when no pipeline was involved.
provenance.kind string Always live_recording; it tells this record apart from the provenance of a generated or edited asset.
provenance.live_stream_id string Identifier of the live stream that was recorded (mst_ followed by 26 characters). List a library’s assets with live_stream_id to find every recording of one stream.
provenance.broadcast_started_at string When the recorded broadcast began, as an RFC 3339 UTC timestamp. A stream recorded in several broadcasts has one asset per broadcast, each with its own start.
provenance.broadcast_ended_at string When the recorded broadcast ended, as an RFC 3339 UTC timestamp.
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.
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.
colors[].hex string The colour as lower-case #rrggbb, the average of the pixels it stands for.
colors[].ratio number Share of the opaque pixels this colour covers, from 0 to 1 with three decimals.
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.
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.
duplicates.exact array<string> Assets holding exactly the same bytes, oldest first, at most 20.
duplicates.similar array<string> Images whose perceptual hash is within distance 6 but whose bytes differ (resized or re-encoded), closest first, at most 20.
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.
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.
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.
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.
versions[].version_id string Identifier of this version; it stays the same when the version stops being current. Pass it to the restore endpoint.
versions[].version number The asset’s version number while these bytes were current.
versions[].bytes number Size of these bytes.
versions[].format string File format of these bytes, such as png.
versions[].number number This version’s number in the asset’s history, starting at 1: assigned when the version is written and never changed, so a restore or the release of the oldest kept version renumbers nothing. Show it as v1, v2 and so on.
versions[].restored_from number Present only on a version a restore produced: the number of the version whose bytes it brought back.
versions[].width number Width in pixels, for images and videos.
versions[].height number Height in pixels, for images and videos.
versions[].duration number Length in seconds, for audio and video.
versions[].created_at string When these bytes were uploaded.
versions[].current boolean True for the asset’s current bytes, false for a kept version.
终端窗口
curl -X POST "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets/import" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"file_id":"file-aaHkn19JHMTvZuwuyWttmLO9","public_id":"imported/pixel"}'

HTTP 200

{
"asset_id": "bcea51995970417fbd26581e2298dd4e",
"public_id": "imported/pixel",
"display_name": "pixel",
"asset_folder": "",
"type": "authenticated",
"format": "png",
"version": 1794550638,
"version_id": "049dca0be73a4808a30cf1a6e0e45646",
"bytes": 70,
"etag": "497790947d4666760ce38f3c00e852c7",
"width": 1,
"height": 1,
"original_filename": "pixel",
"tags": [],
"created_at": "2026-11-13T06:17:18.059Z",
"url": "https://media.praxisusercontent.com/lib_ab7c545e85994e108974c89aa2078cf8/image/authenticated/v1794550638/imported/pixel.png?__cld_token__=st%3D1794550638%7Eexp%3D1794551538%7Eacl%3D%252Flib_ab7c545e85994e108974c89aa2078cf8%252Fimage%252Fauthenticated%252Fv1794550638%252Fimported%252Fpixel.png%7Ehmac%3D8d787b475c70076dbe1a4c72084306bbdbd9c7765e6f813f67e07bf20b787b4a",
"secure_url": "https://media.praxisusercontent.com/lib_ab7c545e85994e108974c89aa2078cf8/image/authenticated/v1794550638/imported/pixel.png?__cld_token__=st%3D1794550638%7Eexp%3D1794551538%7Eacl%3D%252Flib_ab7c545e85994e108974c89aa2078cf8%252Fimage%252Fauthenticated%252Fv1794550638%252Fimported%252Fpixel.png%7Ehmac%3D8d787b475c70076dbe1a4c72084306bbdbd9c7765e6f813f67e07bf20b787b4a",
"placeholder": false,
"library_id": "lib_ab7c545e85994e108974c89aa2078cf8",
"sha256": "497790947d4666760ce38f3c00e852c71fdb66cae849bae8e9ede352719e1581",
"status": "active",
"processing": {
"state": "pending",
"kinds": {
"visual": "pending",
"embedding": "pending"
},
"updated_at": "2026-11-13T06:17:18.059Z"
},
"semantic": "pending",
"has_alpha": true,
"material_type": "image",
"root_id": "bcea51995970417fbd26581e2298dd4e",
"viewer_url": "https://console.deepraxis.com/media/lib_ab7c545e85994e108974c89aa2078cf8?asset_id=bcea51995970417fbd26581e2298dd4e"
}

读取素材

GET /media/v1/libraries/{library_id}/assets/{asset_id}

参数 位置 类型 说明
library_id path string 库 ID
asset_id path string 素材 ID
versions query boolean —

返回: Asset.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
public_id string Delivery identifier unique within this library, used in asset URLs.
display_name string Human-readable asset name, independent of its delivery identifier.
asset_folder string Organizational folder path; the empty string denotes the root folder.
type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
format string Detected file format used as the delivery URL extension.
version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
version_id string Identifier for this asset version, regenerated on overwrite.
bytes number Size of the original source content, in bytes.
etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
width number Source image or video width in pixels, when known.
height number Source image or video height in pixels, when known.
duration number Source audio or video duration in seconds, when known.
pages number Number of pages recorded for the asset; omitted when no page count is stored.
audio object Detected audio track metadata, omitted when no audio track information is available.
audio.codec string Detected audio codec identifier, when known.
audio.channels number Number of audio channels in the detected track, when known.
audio.frequency number Audio sampling frequency in hertz, when known.
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.
original_filename string Original or overridden source filename with its final extension removed.
tags array<string> Labels attached to the asset.
context object Custom string metadata; omitted when empty or excluded by the search projection.
context.custom object Caller-supplied metadata entries with string values.
created_at string Time this asset identity was created, in UTC.
url string URL for retrieving this version of the asset’s original content.
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.
placeholder boolean False because this response represents stored source content.
existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
library_id string Identifier of the library containing this asset.
sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
status string Resource status; active identifies an asset that has not been deleted.
processing object Progress of understanding and embedding tasks for the asset.
processing.stage string | null Current understanding stage: probe, proxy, frames, shots, visual, transcript, transcript_reference, transcript_correction, audio_profile, overview, embedding or finalize. proxy prepares the proxies a large source is understood through. Null after finalization; omitted on assets not yet dispatched.
processing.state string Aggregate processing state across the asset processing tasks.
processing.kinds object Processing states by kind. tagging is present when auto_tagging was requested and follows visual understanding.
processing.updated_at string Time the processing state was last updated, in UTC.
processing.progress object Progress inside the current stage, as {done, total}. Present only while stage is transcript or transcript_reference (counted in audio windows) or transcript_correction (counted in correction batches); cleared when the stage changes.
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.
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.
preview object Generated video previews, present once preview generation succeeds.
preview.poster_url string Delivery URL of the video’s first-frame poster, an image you can open directly. In an authenticated library it is a signed link that expires about 15 minutes after the asset is read; retrieve the asset again for a fresh one.
preview.storyboard object Preview sprite sheet with tile dimensions and sample spacing.
preview.proxy object Low-bitrate proxy renditions for smooth playback while editing; exports use the original source.
generation object Source details for the video-generation job that created this asset.
generation.job_id string Job id that generated this asset.
generation.intent string Generation intent used to create the asset; v1 supports video.generate.
generation.prompt string Text prompt submitted for the generation job.
generation.model string Video-generation model that produced the asset.
material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
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.
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.
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.
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.
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.
provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
provenance.job_id string Generation or edit job that produced this asset; read it with assets and jobs to follow the operation.
provenance.operation string The generation or edit operation that produced this asset.
provenance.prompt string Prompt submitted for this operation, when the operation used one. Omitted for operations without a prompt, such as a plain edit.
provenance.parameters object The generation parameters this asset was made with, recorded from the normalised request the job ran. Its kind says which parameters follow. Omitted on assets written before parameters were recorded; absent never means a default was used.
provenance.references array<object> Assets this result was generated or edited from, each with the role it played. Empty when the operation used no reference asset.
provenance.model string Model that performed the operation, as the model identifier returned by the model API.
provenance.tier string The performance tier that actually performed the operation, present only when the request named a tier instead of a model: the tier that really served it, paired with model.
provenance.elements array<object> Reusable elements (characters, products, scenes, brands) this generation expanded, each with the version read when the job was created. The service replaced each element in references with its own pictures and appended its written guidance to the prompt; references above lists the pictures the model actually received. Omitted when the request named no element.
provenance.cost object The part of the generation job’s charge that belongs to this asset, as US dollars in a decimal string with six decimals. A job that produced several outputs from one model call shares that charge between them. Omitted on assets the platform did not charge for and on assets whose charge was not recorded.
provenance.actor object Who started the operation this asset came from.
provenance.pipeline_run_id string Automation run that performed the operation, when it came from a pipeline. Omitted when no pipeline was involved.
provenance.kind string Always live_recording; it tells this record apart from the provenance of a generated or edited asset.
provenance.live_stream_id string Identifier of the live stream that was recorded (mst_ followed by 26 characters). List a library’s assets with live_stream_id to find every recording of one stream.
provenance.broadcast_started_at string When the recorded broadcast began, as an RFC 3339 UTC timestamp. A stream recorded in several broadcasts has one asset per broadcast, each with its own start.
provenance.broadcast_ended_at string When the recorded broadcast ended, as an RFC 3339 UTC timestamp.
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.
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.
colors[].hex string The colour as lower-case #rrggbb, the average of the pixels it stands for.
colors[].ratio number Share of the opaque pixels this colour covers, from 0 to 1 with three decimals.
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.
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.
duplicates.exact array<string> Assets holding exactly the same bytes, oldest first, at most 20.
duplicates.similar array<string> Images whose perceptual hash is within distance 6 but whose bytes differ (resized or re-encoded), closest first, at most 20.
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.
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.
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.
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.
versions[].version_id string Identifier of this version; it stays the same when the version stops being current. Pass it to the restore endpoint.
versions[].version number The asset’s version number while these bytes were current.
versions[].bytes number Size of these bytes.
versions[].format string File format of these bytes, such as png.
versions[].number number This version’s number in the asset’s history, starting at 1: assigned when the version is written and never changed, so a restore or the release of the oldest kept version renumbers nothing. Show it as v1, v2 and so on.
versions[].restored_from number Present only on a version a restore produced: the number of the version whose bytes it brought back.
versions[].width number Width in pixels, for images and videos.
versions[].height number Height in pixels, for images and videos.
versions[].duration number Length in seconds, for audio and video.
versions[].created_at string When these bytes were uploaded.
versions[].current boolean True for the asset’s current bytes, false for a kept version.
终端窗口
curl -X GET "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets/2c25673fd03c41929a22fe860b33d920" \
-H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
"asset_id": "2c25673fd03c41929a22fe860b33d920",
"public_id": "docs/pixel",
"display_name": "pixel",
"asset_folder": "examples",
"type": "authenticated",
"format": "png",
"version": 1794550605,
"version_id": "8b9feb1e071f40858396419a66a4d512",
"bytes": 403,
"etag": "3506470cee1eb3f6ce4df4767d0cfef8",
"width": 128,
"height": 128,
"original_filename": "file",
"tags": [
"docs"
],
"created_at": "2026-11-13T06:16:45.114Z",
"url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550607%7Eexp%3D1794551507%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3D55d15d1db7643310966ea6bd79fe43bdf251f2a2446097a4e7d74863515694ce",
"secure_url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550607%7Eexp%3D1794551507%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3D55d15d1db7643310966ea6bd79fe43bdf251f2a2446097a4e7d74863515694ce",
"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"
}

更新素材

PATCH /media/v1/libraries/{library_id}/assets/{asset_id}

参数 位置 类型 说明
library_id path string 库 ID
asset_id path string 素材 ID

请求体

字段 类型 必填 说明
display_name string 否 显示名称
asset_folder string 否 组织文件夹;不改变 public_id。按它列出时只匹配这一层、不含子文件夹;空字符串表示根
tags string[] 否 素材标签。上传可传逗号分隔字符串(每项去首尾空白、丢弃空项)、数组或重复的 tags 字段;PATCH 只接受数组并整体替换
context object 否 自定义文字键值;PATCH 整体替换,传 {} 清空

返回: Asset.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
public_id string Delivery identifier unique within this library, used in asset URLs.
display_name string Human-readable asset name, independent of its delivery identifier.
asset_folder string Organizational folder path; the empty string denotes the root folder.
type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
format string Detected file format used as the delivery URL extension.
version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
version_id string Identifier for this asset version, regenerated on overwrite.
bytes number Size of the original source content, in bytes.
etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
width number Source image or video width in pixels, when known.
height number Source image or video height in pixels, when known.
duration number Source audio or video duration in seconds, when known.
pages number Number of pages recorded for the asset; omitted when no page count is stored.
audio object Detected audio track metadata, omitted when no audio track information is available.
audio.codec string Detected audio codec identifier, when known.
audio.channels number Number of audio channels in the detected track, when known.
audio.frequency number Audio sampling frequency in hertz, when known.
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.
original_filename string Original or overridden source filename with its final extension removed.
tags array<string> Labels attached to the asset.
context object Custom string metadata; omitted when empty or excluded by the search projection.
context.custom object Caller-supplied metadata entries with string values.
created_at string Time this asset identity was created, in UTC.
url string URL for retrieving this version of the asset’s original content.
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.
placeholder boolean False because this response represents stored source content.
existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
library_id string Identifier of the library containing this asset.
sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
status string Resource status; active identifies an asset that has not been deleted.
processing object Progress of understanding and embedding tasks for the asset.
processing.stage string | null Current understanding stage: probe, proxy, frames, shots, visual, transcript, transcript_reference, transcript_correction, audio_profile, overview, embedding or finalize. proxy prepares the proxies a large source is understood through. Null after finalization; omitted on assets not yet dispatched.
processing.state string Aggregate processing state across the asset processing tasks.
processing.kinds object Processing states by kind. tagging is present when auto_tagging was requested and follows visual understanding.
processing.updated_at string Time the processing state was last updated, in UTC.
processing.progress object Progress inside the current stage, as {done, total}. Present only while stage is transcript or transcript_reference (counted in audio windows) or transcript_correction (counted in correction batches); cleared when the stage changes.
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.
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.
preview object Generated video previews, present once preview generation succeeds.
preview.poster_url string Delivery URL of the video’s first-frame poster, an image you can open directly. In an authenticated library it is a signed link that expires about 15 minutes after the asset is read; retrieve the asset again for a fresh one.
preview.storyboard object Preview sprite sheet with tile dimensions and sample spacing.
preview.proxy object Low-bitrate proxy renditions for smooth playback while editing; exports use the original source.
generation object Source details for the video-generation job that created this asset.
generation.job_id string Job id that generated this asset.
generation.intent string Generation intent used to create the asset; v1 supports video.generate.
generation.prompt string Text prompt submitted for the generation job.
generation.model string Video-generation model that produced the asset.
material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
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.
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.
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.
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.
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.
provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
provenance.job_id string Generation or edit job that produced this asset; read it with assets and jobs to follow the operation.
provenance.operation string The generation or edit operation that produced this asset.
provenance.prompt string Prompt submitted for this operation, when the operation used one. Omitted for operations without a prompt, such as a plain edit.
provenance.parameters object The generation parameters this asset was made with, recorded from the normalised request the job ran. Its kind says which parameters follow. Omitted on assets written before parameters were recorded; absent never means a default was used.
provenance.references array<object> Assets this result was generated or edited from, each with the role it played. Empty when the operation used no reference asset.
provenance.model string Model that performed the operation, as the model identifier returned by the model API.
provenance.tier string The performance tier that actually performed the operation, present only when the request named a tier instead of a model: the tier that really served it, paired with model.
provenance.elements array<object> Reusable elements (characters, products, scenes, brands) this generation expanded, each with the version read when the job was created. The service replaced each element in references with its own pictures and appended its written guidance to the prompt; references above lists the pictures the model actually received. Omitted when the request named no element.
provenance.cost object The part of the generation job’s charge that belongs to this asset, as US dollars in a decimal string with six decimals. A job that produced several outputs from one model call shares that charge between them. Omitted on assets the platform did not charge for and on assets whose charge was not recorded.
provenance.actor object Who started the operation this asset came from.
provenance.pipeline_run_id string Automation run that performed the operation, when it came from a pipeline. Omitted when no pipeline was involved.
provenance.kind string Always live_recording; it tells this record apart from the provenance of a generated or edited asset.
provenance.live_stream_id string Identifier of the live stream that was recorded (mst_ followed by 26 characters). List a library’s assets with live_stream_id to find every recording of one stream.
provenance.broadcast_started_at string When the recorded broadcast began, as an RFC 3339 UTC timestamp. A stream recorded in several broadcasts has one asset per broadcast, each with its own start.
provenance.broadcast_ended_at string When the recorded broadcast ended, as an RFC 3339 UTC timestamp.
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.
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.
colors[].hex string The colour as lower-case #rrggbb, the average of the pixels it stands for.
colors[].ratio number Share of the opaque pixels this colour covers, from 0 to 1 with three decimals.
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.
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.
duplicates.exact array<string> Assets holding exactly the same bytes, oldest first, at most 20.
duplicates.similar array<string> Images whose perceptual hash is within distance 6 but whose bytes differ (resized or re-encoded), closest first, at most 20.
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.
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.
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.
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.
versions[].version_id string Identifier of this version; it stays the same when the version stops being current. Pass it to the restore endpoint.
versions[].version number The asset’s version number while these bytes were current.
versions[].bytes number Size of these bytes.
versions[].format string File format of these bytes, such as png.
versions[].number number This version’s number in the asset’s history, starting at 1: assigned when the version is written and never changed, so a restore or the release of the oldest kept version renumbers nothing. Show it as v1, v2 and so on.
versions[].restored_from number Present only on a version a restore produced: the number of the version whose bytes it brought back.
versions[].width number Width in pixels, for images and videos.
versions[].height number Height in pixels, for images and videos.
versions[].duration number Length in seconds, for audio and video.
versions[].created_at string When these bytes were uploaded.
versions[].current boolean True for the asset’s current bytes, false for a kept version.
终端窗口
curl -X PATCH "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets/2c25673fd03c41929a22fe860b33d920" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"display_name":"Sample image"}'

HTTP 200

{
"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",
"tags": [
"docs"
],
"created_at": "2026-11-13T06:16:45.114Z",
"url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550608%7Eexp%3D1794551508%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3D9b35d2b3547a3d2dcfd40fef1a072989fff97a9a37d58b56c01999d5f2debf6e",
"secure_url": "https://media.praxisusercontent.com/lib_200f2b495e5f456194e746d66a3a8999/image/authenticated/v1794550605/docs/pixel.png?__cld_token__=st%3D1794550608%7Eexp%3D1794551508%7Eacl%3D%252Flib_200f2b495e5f456194e746d66a3a8999%252Fimage%252Fauthenticated%252Fv1794550605%252Fdocs%252Fpixel.png%7Ehmac%3D9b35d2b3547a3d2dcfd40fef1a072989fff97a9a37d58b56c01999d5f2debf6e",
"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"
}

删除素材

DELETE /media/v1/libraries/{library_id}/assets/{asset_id}

参数 位置 类型 说明
library_id path string 库 ID
asset_id path string 素材 ID

返回: Deleted.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
deleted boolean True once this asset has been removed from the library.
dependents array<string> Elements (character, product, scene or brand) whose body still names the deleted asset as a reference picture, logo or font. Present only when there are some; the delete still succeeded, and generating with those elements now fails until their body is updated.
终端窗口
curl -X DELETE "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets/0b189e47017149e5aea17955ada66d31" \
-H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
"deleted": true
}

恢复素材版本

POST /media/v1/libraries/{library_id}/assets/{asset_id}/versions/{version_id}/restore

参数 位置 类型 说明
library_id path string 库 ID
asset_id path string 素材 ID
version_id path string 版本标识

返回: Asset.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
public_id string Delivery identifier unique within this library, used in asset URLs.
display_name string Human-readable asset name, independent of its delivery identifier.
asset_folder string Organizational folder path; the empty string denotes the root folder.
type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
format string Detected file format used as the delivery URL extension.
version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
version_id string Identifier for this asset version, regenerated on overwrite.
bytes number Size of the original source content, in bytes.
etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
width number Source image or video width in pixels, when known.
height number Source image or video height in pixels, when known.
duration number Source audio or video duration in seconds, when known.
pages number Number of pages recorded for the asset; omitted when no page count is stored.
audio object Detected audio track metadata, omitted when no audio track information is available.
audio.codec string Detected audio codec identifier, when known.
audio.channels number Number of audio channels in the detected track, when known.
audio.frequency number Audio sampling frequency in hertz, when known.
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.
original_filename string Original or overridden source filename with its final extension removed.
tags array<string> Labels attached to the asset.
context object Custom string metadata; omitted when empty or excluded by the search projection.
context.custom object Caller-supplied metadata entries with string values.
created_at string Time this asset identity was created, in UTC.
url string URL for retrieving this version of the asset’s original content.
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.
placeholder boolean False because this response represents stored source content.
existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
library_id string Identifier of the library containing this asset.
sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
status string Resource status; active identifies an asset that has not been deleted.
processing object Progress of understanding and embedding tasks for the asset.
processing.stage string | null Current understanding stage: probe, proxy, frames, shots, visual, transcript, transcript_reference, transcript_correction, audio_profile, overview, embedding or finalize. proxy prepares the proxies a large source is understood through. Null after finalization; omitted on assets not yet dispatched.
processing.state string Aggregate processing state across the asset processing tasks.
processing.kinds object Processing states by kind. tagging is present when auto_tagging was requested and follows visual understanding.
processing.updated_at string Time the processing state was last updated, in UTC.
processing.progress object Progress inside the current stage, as {done, total}. Present only while stage is transcript or transcript_reference (counted in audio windows) or transcript_correction (counted in correction batches); cleared when the stage changes.
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.
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.
preview object Generated video previews, present once preview generation succeeds.
preview.poster_url string Delivery URL of the video’s first-frame poster, an image you can open directly. In an authenticated library it is a signed link that expires about 15 minutes after the asset is read; retrieve the asset again for a fresh one.
preview.storyboard object Preview sprite sheet with tile dimensions and sample spacing.
preview.proxy object Low-bitrate proxy renditions for smooth playback while editing; exports use the original source.
generation object Source details for the video-generation job that created this asset.
generation.job_id string Job id that generated this asset.
generation.intent string Generation intent used to create the asset; v1 supports video.generate.
generation.prompt string Text prompt submitted for the generation job.
generation.model string Video-generation model that produced the asset.
material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
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.
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.
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.
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.
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.
provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
provenance.job_id string Generation or edit job that produced this asset; read it with assets and jobs to follow the operation.
provenance.operation string The generation or edit operation that produced this asset.
provenance.prompt string Prompt submitted for this operation, when the operation used one. Omitted for operations without a prompt, such as a plain edit.
provenance.parameters object The generation parameters this asset was made with, recorded from the normalised request the job ran. Its kind says which parameters follow. Omitted on assets written before parameters were recorded; absent never means a default was used.
provenance.references array<object> Assets this result was generated or edited from, each with the role it played. Empty when the operation used no reference asset.
provenance.model string Model that performed the operation, as the model identifier returned by the model API.
provenance.tier string The performance tier that actually performed the operation, present only when the request named a tier instead of a model: the tier that really served it, paired with model.
provenance.elements array<object> Reusable elements (characters, products, scenes, brands) this generation expanded, each with the version read when the job was created. The service replaced each element in references with its own pictures and appended its written guidance to the prompt; references above lists the pictures the model actually received. Omitted when the request named no element.
provenance.cost object The part of the generation job’s charge that belongs to this asset, as US dollars in a decimal string with six decimals. A job that produced several outputs from one model call shares that charge between them. Omitted on assets the platform did not charge for and on assets whose charge was not recorded.
provenance.actor object Who started the operation this asset came from.
provenance.pipeline_run_id string Automation run that performed the operation, when it came from a pipeline. Omitted when no pipeline was involved.
provenance.kind string Always live_recording; it tells this record apart from the provenance of a generated or edited asset.
provenance.live_stream_id string Identifier of the live stream that was recorded (mst_ followed by 26 characters). List a library’s assets with live_stream_id to find every recording of one stream.
provenance.broadcast_started_at string When the recorded broadcast began, as an RFC 3339 UTC timestamp. A stream recorded in several broadcasts has one asset per broadcast, each with its own start.
provenance.broadcast_ended_at string When the recorded broadcast ended, as an RFC 3339 UTC timestamp.
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.
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.
colors[].hex string The colour as lower-case #rrggbb, the average of the pixels it stands for.
colors[].ratio number Share of the opaque pixels this colour covers, from 0 to 1 with three decimals.
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.
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.
duplicates.exact array<string> Assets holding exactly the same bytes, oldest first, at most 20.
duplicates.similar array<string> Images whose perceptual hash is within distance 6 but whose bytes differ (resized or re-encoded), closest first, at most 20.
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.
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.
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.
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.
versions[].version_id string Identifier of this version; it stays the same when the version stops being current. Pass it to the restore endpoint.
versions[].version number The asset’s version number while these bytes were current.
versions[].bytes number Size of these bytes.
versions[].format string File format of these bytes, such as png.
versions[].number number This version’s number in the asset’s history, starting at 1: assigned when the version is written and never changed, so a restore or the release of the oldest kept version renumbers nothing. Show it as v1, v2 and so on.
versions[].restored_from number Present only on a version a restore produced: the number of the version whose bytes it brought back.
versions[].width number Width in pixels, for images and videos.
versions[].height number Height in pixels, for images and videos.
versions[].duration number Length in seconds, for audio and video.
versions[].created_at string When these bytes were uploaded.
versions[].current boolean True for the asset’s current bytes, false for a kept version.

重新处理素材

POST /media/v1/libraries/{library_id}/assets/{asset_id}/reprocess

参数 位置 类型 说明
library_id path string 库 ID
asset_id path string 素材 ID

请求体

字段 类型 必填 说明
kinds ProcessingKind[] 否 要强制重跑的处理种类;省略时只重试失败项

返回: Asset.

kinds 可选 visual、frames、transcript、embedding。不带 kinds 时,只重跑当前素材版本的失败任务。显式传 kinds 时,所选的 ready、failed、unsupported 任务会重置为 pending 并强制重跑;pending 或 running 任务原样跳过,重复请求不会重复入队。

kinds 必须适用于素材类型:图片为 visual、embedding;音频为 transcript、embedding;视频为 frames、visual、transcript、embedding;raw 没有可重跑的种类。全部不适用时返回 400 INVALID_PARAMS,消息列出该素材可用的 kinds;部分适用时只处理适用的种类,其余忽略(返回的 Asset 没有字段说明被忽略的种类,请以 processing.kinds 为准)。

重跑 visual、frames 或 transcript 时,旧结果立即标记为 superseded,同时将 embedding 与素材的 semantic 置为 pending。旧向量继续服务语义检索,直到新的向量写入后才被替换,因此重新处理期间素材不会从检索结果中消失;期间命中片段可能显示素材名称而非旧描述。默认读取只返回当前结果;使用 include_superseded=true 可查看历史。请求立即返回更新后的 Asset,处理异步完成。

终端窗口
curl -X POST "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets/${ASSET_ID}/reprocess" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{}'

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
asset_id string Generated asset identifier: 32 lowercase hexadecimal characters, preserved across overwrites.
public_id string Delivery identifier unique within this library, used in asset URLs.
display_name string Human-readable asset name, independent of its delivery identifier.
asset_folder string Organizational folder path; the empty string denotes the root folder.
type string Asset delivery mode: upload is public; authenticated requires a signed URL or delivery token for originals and derivatives. private is unsupported.
format string Detected file format used as the delivery URL extension.
version number Monotonically increasing asset version used in delivery URLs; based on upload time in Unix seconds and advanced on overwrite.
version_id string Identifier for this asset version, regenerated on overwrite.
bytes number Size of the original source content, in bytes.
etag string MD5 digest of the source bytes, as 32 lowercase hexadecimal characters.
width number Source image or video width in pixels, when known.
height number Source image or video height in pixels, when known.
duration number Source audio or video duration in seconds, when known.
pages number Number of pages recorded for the asset; omitted when no page count is stored.
audio object Detected audio track metadata, omitted when no audio track information is available.
audio.codec string Detected audio codec identifier, when known.
audio.channels number Number of audio channels in the detected track, when known.
audio.frequency number Audio sampling frequency in hertz, when known.
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.
original_filename string Original or overridden source filename with its final extension removed.
tags array<string> Labels attached to the asset.
context object Custom string metadata; omitted when empty or excluded by the search projection.
context.custom object Caller-supplied metadata entries with string values.
created_at string Time this asset identity was created, in UTC.
url string URL for retrieving this version of the asset’s original content.
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.
placeholder boolean False because this response represents stored source content.
existing boolean True when overwrite is false and the public_id already exists; the existing resource is returned.
library_id string Identifier of the library containing this asset.
sha256 string SHA-256 digest of the source bytes, as 64 lowercase hexadecimal characters.
status string Resource status; active identifies an asset that has not been deleted.
processing object Progress of understanding and embedding tasks for the asset.
processing.stage string | null Current understanding stage: probe, proxy, frames, shots, visual, transcript, transcript_reference, transcript_correction, audio_profile, overview, embedding or finalize. proxy prepares the proxies a large source is understood through. Null after finalization; omitted on assets not yet dispatched.
processing.state string Aggregate processing state across the asset processing tasks.
processing.kinds object Processing states by kind. tagging is present when auto_tagging was requested and follows visual understanding.
processing.updated_at string Time the processing state was last updated, in UTC.
processing.progress object Progress inside the current stage, as {done, total}. Present only while stage is transcript or transcript_reference (counted in audio windows) or transcript_correction (counted in correction batches); cleared when the stage changes.
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.
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.
preview object Generated video previews, present once preview generation succeeds.
preview.poster_url string Delivery URL of the video’s first-frame poster, an image you can open directly. In an authenticated library it is a signed link that expires about 15 minutes after the asset is read; retrieve the asset again for a fresh one.
preview.storyboard object Preview sprite sheet with tile dimensions and sample spacing.
preview.proxy object Low-bitrate proxy renditions for smooth playback while editing; exports use the original source.
generation object Source details for the video-generation job that created this asset.
generation.job_id string Job id that generated this asset.
generation.intent string Generation intent used to create the asset; v1 supports video.generate.
generation.prompt string Text prompt submitted for the generation job.
generation.model string Video-generation model that produced the asset.
material_type string What this asset is as a reusable material. Always present; a file whose specific kind cannot be identified is file.
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.
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.
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.
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.
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.
provenance object How this asset was generated or edited, including the model, prompt and references. Omitted on uploaded, imported and legacy assets.
provenance.job_id string Generation or edit job that produced this asset; read it with assets and jobs to follow the operation.
provenance.operation string The generation or edit operation that produced this asset.
provenance.prompt string Prompt submitted for this operation, when the operation used one. Omitted for operations without a prompt, such as a plain edit.
provenance.parameters object The generation parameters this asset was made with, recorded from the normalised request the job ran. Its kind says which parameters follow. Omitted on assets written before parameters were recorded; absent never means a default was used.
provenance.references array<object> Assets this result was generated or edited from, each with the role it played. Empty when the operation used no reference asset.
provenance.model string Model that performed the operation, as the model identifier returned by the model API.
provenance.tier string The performance tier that actually performed the operation, present only when the request named a tier instead of a model: the tier that really served it, paired with model.
provenance.elements array<object> Reusable elements (characters, products, scenes, brands) this generation expanded, each with the version read when the job was created. The service replaced each element in references with its own pictures and appended its written guidance to the prompt; references above lists the pictures the model actually received. Omitted when the request named no element.
provenance.cost object The part of the generation job’s charge that belongs to this asset, as US dollars in a decimal string with six decimals. A job that produced several outputs from one model call shares that charge between them. Omitted on assets the platform did not charge for and on assets whose charge was not recorded.
provenance.actor object Who started the operation this asset came from.
provenance.pipeline_run_id string Automation run that performed the operation, when it came from a pipeline. Omitted when no pipeline was involved.
provenance.kind string Always live_recording; it tells this record apart from the provenance of a generated or edited asset.
provenance.live_stream_id string Identifier of the live stream that was recorded (mst_ followed by 26 characters). List a library’s assets with live_stream_id to find every recording of one stream.
provenance.broadcast_started_at string When the recorded broadcast began, as an RFC 3339 UTC timestamp. A stream recorded in several broadcasts has one asset per broadcast, each with its own start.
provenance.broadcast_ended_at string When the recorded broadcast ended, as an RFC 3339 UTC timestamp.
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.
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.
colors[].hex string The colour as lower-case #rrggbb, the average of the pixels it stands for.
colors[].ratio number Share of the opaque pixels this colour covers, from 0 to 1 with three decimals.
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.
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.
duplicates.exact array<string> Assets holding exactly the same bytes, oldest first, at most 20.
duplicates.similar array<string> Images whose perceptual hash is within distance 6 but whose bytes differ (resized or re-encoded), closest first, at most 20.
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.
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.
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.
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.
versions[].version_id string Identifier of this version; it stays the same when the version stops being current. Pass it to the restore endpoint.
versions[].version number The asset’s version number while these bytes were current.
versions[].bytes number Size of these bytes.
versions[].format string File format of these bytes, such as png.
versions[].number number This version’s number in the asset’s history, starting at 1: assigned when the version is written and never changed, so a restore or the release of the oldest kept version renumbers nothing. Show it as v1, v2 and so on.
versions[].restored_from number Present only on a version a restore produced: the number of the version whose bytes it brought back.
versions[].width number Width in pixels, for images and videos.
versions[].height number Height in pixels, for images and videos.
versions[].duration number Length in seconds, for audio and video.
versions[].created_at string When these bytes were uploaded.
versions[].current boolean True for the asset’s current bytes, false for a kept version.

读取编辑树

GET /media/v1/libraries/{library_id}/assets/{asset_id}/lineage

参数 位置 类型 说明
library_id path string 库 ID
asset_id path string 素材 ID

返回: LineageTree.

响应

HTTP 200

Successful response.

application/json

名称 类型 说明
root_id string Asset at the root of this tree, the original the rest were edited from; equals focus_id when the asset is itself a root.
focus_id string Asset this tree was requested for.
nodes array<object> Every asset in the tree, including the root and the focused asset; deleted assets are included so the tree stays connected.
nodes[].asset_id string Asset this step of the edit tree produced; deleted assets are still listed so the tree stays connected.
nodes[].parent_id string | null Asset this one was edited from; null for the root of the tree.
nodes[].operation string | null The edit or generation operation that produced this asset; null when the asset has no recorded operation.
nodes[].prompt string Prompt submitted for this operation, when the operation used one.
nodes[].created_at string Time this asset was created, in UTC.
nodes[].deleted boolean True when this asset has been deleted; deleted assets remain in the tree so earlier steps stay reachable.
终端窗口
curl -X GET "https://api.deepraxis.com/media/v1/libraries/${LIBRARY_ID}/assets/0b189e47017149e5aea17955ada66d31/lineage" \
-H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
"root_id": "0b189e47017149e5aea17955ada66d31",
"focus_id": "0b189e47017149e5aea17955ada66d31",
"nodes": [
{
"asset_id": "0b189e47017149e5aea17955ada66d31",
"parent_id": null,
"operation": null,
"created_at": "2026-11-13T06:17:08.615Z",
"deleted": false
}
]
}

FrameUrls

字段 类型 必填 说明
frames object[] 是 —

AssetPage

字段 类型 必填 说明
data Asset[] 是 本页结果
next_cursor string / null 是 下一页游标;没有时为 null 或省略

Asset

字段 类型 必填 说明
asset_id AssetId 是 素材 ID
public_id string 是 交付地址中的素材名称,可带路径
display_name string 是 显示名称
asset_folder string 是 组织文件夹;不改变 public_id。按它列出时只匹配这一层、不含子文件夹;空字符串表示根
type DeliveryType 是 资源或事件类型
format string 是 文件格式
version number 是 交付版本号
version_id string 是 版本标识
bytes number 是 文件字节数
etag string 是 文件校验标识
width number 否 宽度像素
height number 否 高度像素
duration number 否 时长秒数
pages number 否 文档页数
audio object 否 —
has_audio false 否 —
original_filename string 否 原文件名称
tags string[] 是 素材标签。上传可传逗号分隔字符串(每项去首尾空白、丢弃空项)、数组或重复的 tags 字段;PATCH 只接受数组并整体替换
context object 否 自定义文字键值;PATCH 整体替换,传 {} 清空
created_at IsoTimestamp 是 创建时间
url string 是 原文件地址
secure_url string 是 HTTPS 交付地址
placeholder false 是 固定为 false
existing boolean 否 未覆盖时是否返回已有素材
library_id LibraryId 是 库 ID
sha256 string 是 内容校验摘要
status "active" 是 资源状态
processing Processing 是 整体与各项理解状态
has_alpha boolean 否 —
semantic "pending" / "ready" / "unavailable" 是 ready 时可语义检索
preview object 否 预览海报和故事板
generation object 否 —
material_type MaterialType 是 —
audio_role AudioRole 否 —
animated true 否 —
derived_from AssetId / null 否 —
root_id AssetId 否 —
ai_generated boolean 否 —
provenance Provenance / RecordingProvenance 否 —
viewer_url string 否 —
colors AssetColor[] 否 —
phash string 否 —
duplicates AssetDuplicates 否 —
used_by_elements AssetId[] 否 —
duplicate_of AssetId 否 —
stack_count number 否 —
versions AssetVersion[] 否 —

Deleted

字段 类型 必填 说明
deleted true 是 删除结果
dependents AssetId[] 否 —

LineageTree

字段 类型 必填 说明
root_id AssetId 是 —
focus_id AssetId 是 —
nodes LineageNode[] 是 —

Processing

字段 类型 必填 说明
stage "probe" / "proxy" / "frames" / "shots" / "visual" / "transcript" / "transcript_reference" / "transcript_correction" / "audio_profile" / "overview" / "embedding" / "finalize" / null 否 —
state ProcessingState 是 整体处理状态
kinds object 是 各项处理状态
updated_at IsoTimestamp 是 更新时间
progress object 否 —

Storyboard

字段 类型 必填 说明
url string 是 原文件地址
tiles number 是 故事板画面数
interval_ms number 是 画面间隔毫秒数
tile_width number 是 单个画面宽度
tile_height number 是 单个画面高度

私有素材

新上传与导入默认组织私有(type=authenticated),原文件、海报、故事板、音视频代理与变换图均需签名或投递令牌。只有显式 type=upload 才公开,包括原文件与派生文件;头像、吉祥物和商品图需要匿名访问时必须显式传入。与公开投递的旧约定不同,这里默认私有。覆盖省略 type 保留当前类型,overwrite=false 返回已有素材而不更改类型;rename 来源查找仍默认 upload,省略 to_type 保留来源类型。private 不支持。

资源 JSON 的 secure_url 已由服务端签名,可直接用于原文件。签名与具体交付路径绑定,不能直接修改签名 URL 来请求变换图。我们不外发签名密钥,因此不能使用 SDK 本地 sign_url;变换图使用 POST /media/v1/libraries/{library_id}/delivery_tokens 签发的 token,将其作为 __cld_token__ 查询参数,并对值做一次 URL 编码。

准备已有库的 LIBRARY_ID、同环境的 PRAXIS_API_KEY,以及可公开抓取的图片 HTTPS 地址 SOURCE_IMAGE_URL。以下 Node.js 示例读取授权缩略图并输出素材引用与到期时间;Develop 环境把 PRAXIS_API_BASE 设为该环境的 API 地址。

const base = process.env.PRAXIS_API_BASE ?? "https://api.deepraxis.com";
const key = process.env.PRAXIS_API_KEY;
const libraryId = process.env.LIBRARY_ID;
const file = process.env.SOURCE_IMAGE_URL;
if (!key || !libraryId || !file) throw new Error("Set PRAXIS_API_KEY, LIBRARY_ID, SOURCE_IMAGE_URL");
async function post(suffix, body) {
const response = await fetch(base + "/media/v1/libraries/" + libraryId + suffix, {
method: "POST",
headers: { Authorization: "Bearer " + key, "Content-Type": "application/json" },
body: JSON.stringify(body),
});
if (!response.ok) throw new Error(await response.text());
return response.json();
}
const asset = await post("/assets", { file });
// Save libraryId, asset.asset_id and asset.version as the durable reference.
const { token, expires_at } = await post("/delivery_tokens", {
acl: "/" + libraryId + "/image/authenticated/*",
expires_in: 3600,
});
const publicId = asset.public_id.split("/").map(encodeURIComponent).join("/");
const thumbnail = new URL(
"/" + libraryId + "/image/authenticated/w_160,c_fit/v" + asset.version + "/" + publicId + "." + asset.format,
asset.secure_url,
);
thumbnail.searchParams.set("__cld_token__", token);
const response = await fetch(thumbnail);
if (!response.ok) throw new Error("Thumbnail HTTP " + response.status);
await response.arrayBuffer();
console.log({ library_id: libraryId, asset_id: asset.asset_id, version: asset.version, expires_at });

令牌请求字段为 { acl?: string, expires_in?: integer },响应为 { token, expires_at }。acl 默认覆盖当前库(/{library_id}/*),必须限定在该库路径内;示例缩小到图片私有投递路径。expires_in 单位为秒,默认 900,范围 1–604800。持有者在过期前可以读取 ACL 匹配的路径;按需缩小范围和有效期。原图与带 token 的缩略图应返回 200;未授权的私有交付返回 404。投递令牌默认有效 900 秒,取帧链接有效 300 秒;过期后按素材引用重新获取。长期保存 library_id、asset_id、version 与所需表示,不保存令牌或带令牌链接,也不要记录到日志。链接是持有者凭据,只交给预期读者。