Media

Libraries

Requests, objects, and responses.

Guide →

Base URL and authentication

Create library

POST /media/v1/libraries

Request body

FieldTypeRequiredDescription
modelsMediaModelsInputnoModel call IDs by role; partial updates, null restores defaults
namestringyesName, 1–64 characters; duplicates are allowed
labelsobjectnoLabels object; JSON-encode for GET. PATCH replaces the whole object; {} clears it
understandingobjectnoVisual, transcript, and semantic understanding settings

Returns: Library.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
searchobjectSearch capabilities of this library’s embedding model.
search.imagebooleanWhether this library’s embedding model supports image-based visual search.
modelsobjectResolved model call IDs used for new uploads and reprocessing.
models.visionstringModel call ID for visual descriptions; the model must support image input.
models.embeddingstringModel call ID for search embeddings; must produce compatible vectors and cannot change while assets exist.
models.transcriptionstringModel call ID for speech transcription.
idstringGenerated library identifier: lib_ followed by 32 lowercase hexadecimal characters.
namestringDisplay name of the library; duplicate names are allowed.
labelsobjectCaller-defined string labels used to organize and filter libraries.
statusstringLibrary lifecycle: provisioning initializes the library; active permits asset operations; deleting awaits purge and may be restored before purge_at; deleted has been purged; failed indicates initialization failure.
asset_countnumberNumber of assets currently stored in the library.
bytesnumberTotal source-content size of the library’s assets, in bytes.
understandingobjectSettings controlling understanding tasks for new uploads.
understanding.visualbooleanEnable captions, tags and OCR for images and video frames.
understanding.transcriptbooleanEnable speech transcription for audio and video soundtracks.
understanding.embeddingbooleanEnable generation of vectors for semantic search.
created_atstringTime the library was created, in UTC.
updated_atstringTime library settings, lifecycle or usage were last updated, in UTC.
deleted_atstring | nullTime the library entered deleting, or null when active or restored.
purge_atstring | nullScheduled purge time while the library is deleting; null for an active or restored library.
curl -X POST "https://api.deepraxis.ai/media/v1/libraries" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"name":"walk-lib-r1-MDP-1791733789929","labels":{"sample":"walk-lib-r1-MDP-1791733789929"}}'

HTTP 200

{
  "id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "name": "walk-lib-r1-MDP-1791733789929",
  "labels": {
    "sample": "walk-lib-r1-MDP-1791733789929"
  },
  "status": "active",
  "asset_count": 0,
  "bytes": 0,
  "models": {
    "vision": "qwen3.8-flash",
    "embedding": "qwen3-vl-embedding",
    "transcription": "whisper-large-v3-turbo"
  },
  "search": {
    "image": true
  },
  "understanding": {
    "visual": true,
    "transcript": true,
    "embedding": true
  },
  "created_at": "2026-10-11T15:50:04.230Z",
  "updated_at": "2026-10-11T15:50:04.931Z",
  "deleted_at": null,
  "purge_at": null
}

List libraries

GET /media/v1/libraries

ParameterLocationTypeDescription
cursorquerystringPrevious next_cursor
limitqueryinteger1–200 items per page, default 50
labelsquerystringLabels object; JSON-encode for GET. PATCH replaces the whole object; {} clears it
statusqueryactive / deletingResource status

Returns: LibraryPage.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
dataarray<object>Libraries in this page, ordered by creation time descending.
data[].searchobjectSearch capabilities of this library’s embedding model.
data[].modelsobjectResolved model call IDs used for new uploads and reprocessing.
data[].idstringGenerated library identifier: lib_ followed by 32 lowercase hexadecimal characters.
data[].namestringDisplay name of the library; duplicate names are allowed.
data[].labelsobjectCaller-defined string labels used to organize and filter libraries.
data[].statusstringLibrary lifecycle: provisioning initializes the library; active permits asset operations; deleting awaits purge and may be restored before purge_at; deleted has been purged; failed indicates initialization failure.
data[].asset_countnumberNumber of assets currently stored in the library.
data[].bytesnumberTotal source-content size of the library’s assets, in bytes.
data[].understandingobjectSettings controlling understanding tasks for new uploads.
data[].created_atstringTime the library was created, in UTC.
data[].updated_atstringTime library settings, lifecycle or usage were last updated, in UTC.
data[].deleted_atstring | nullTime the library entered deleting, or null when active or restored.
data[].purge_atstring | nullScheduled purge time while the library is deleting; null for an active or restored library.
next_cursorstring | nullOpaque token to pass as cursor to listLibraries; null means no further page.
curl -X GET "https://api.deepraxis.ai/media/v1/libraries?labels=%7B%22sample%22%3A%22walk-lib-r1-MDP-1791733789929%22%7D" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
  "data": [
    {
      "id": "lib_d3881a2f54a34cd79121b9d659e8378c",
      "name": "walk-lib-r1-MDP-1791733789929",
      "status": "active",
      "asset_count": 0,
      "bytes": 0,
      "created_at": "2026-10-11T15:50:04.230Z",
      "updated_at": "2026-10-11T15:50:04.931Z",
      "deleted_at": null,
      "purge_at": null,
      "search": {
        "image": true
      },
      "models": {
        "vision": "qwen3.8-flash",
        "embedding": "qwen3-vl-embedding",
        "transcription": "whisper-large-v3-turbo"
      },
      "labels": {
        "sample": "walk-lib-r1-MDP-1791733789929"
      },
      "understanding": {
        "visual": true,
        "transcript": true,
        "embedding": true
      }
    }
  ],
  "next_cursor": null
}

Get library

GET /media/v1/libraries/{library_id}

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Returns: Library.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
searchobjectSearch capabilities of this library’s embedding model.
search.imagebooleanWhether this library’s embedding model supports image-based visual search.
modelsobjectResolved model call IDs used for new uploads and reprocessing.
models.visionstringModel call ID for visual descriptions; the model must support image input.
models.embeddingstringModel call ID for search embeddings; must produce compatible vectors and cannot change while assets exist.
models.transcriptionstringModel call ID for speech transcription.
idstringGenerated library identifier: lib_ followed by 32 lowercase hexadecimal characters.
namestringDisplay name of the library; duplicate names are allowed.
labelsobjectCaller-defined string labels used to organize and filter libraries.
statusstringLibrary lifecycle: provisioning initializes the library; active permits asset operations; deleting awaits purge and may be restored before purge_at; deleted has been purged; failed indicates initialization failure.
asset_countnumberNumber of assets currently stored in the library.
bytesnumberTotal source-content size of the library’s assets, in bytes.
understandingobjectSettings controlling understanding tasks for new uploads.
understanding.visualbooleanEnable captions, tags and OCR for images and video frames.
understanding.transcriptbooleanEnable speech transcription for audio and video soundtracks.
understanding.embeddingbooleanEnable generation of vectors for semantic search.
created_atstringTime the library was created, in UTC.
updated_atstringTime library settings, lifecycle or usage were last updated, in UTC.
deleted_atstring | nullTime the library entered deleting, or null when active or restored.
purge_atstring | nullScheduled purge time while the library is deleting; null for an active or restored library.
curl -X GET "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
  "id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "name": "walk-lib-r1-MDP-1791733789929",
  "status": "active",
  "asset_count": 0,
  "bytes": 0,
  "created_at": "2026-10-11T15:50:04.230Z",
  "updated_at": "2026-10-11T15:50:04.931Z",
  "deleted_at": null,
  "purge_at": null,
  "search": {
    "image": true
  },
  "models": {
    "vision": "qwen3.8-flash",
    "embedding": "qwen3-vl-embedding",
    "transcription": "whisper-large-v3-turbo"
  },
  "labels": {
    "sample": "walk-lib-r1-MDP-1791733789929"
  },
  "understanding": {
    "visual": true,
    "transcript": true,
    "embedding": true
  }
}

Update library

PATCH /media/v1/libraries/{library_id}

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Request body

FieldTypeRequiredDescription
modelsMediaModelsInputnoModel call IDs by role; partial updates, null restores defaults
namestringnoName, 1–64 characters; duplicates are allowed
labelsobjectnoLabels object; JSON-encode for GET. PATCH replaces the whole object; {} clears it
understandingobjectnoVisual, transcript, and semantic understanding settings

Returns: Library.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
searchobjectSearch capabilities of this library’s embedding model.
search.imagebooleanWhether this library’s embedding model supports image-based visual search.
modelsobjectResolved model call IDs used for new uploads and reprocessing.
models.visionstringModel call ID for visual descriptions; the model must support image input.
models.embeddingstringModel call ID for search embeddings; must produce compatible vectors and cannot change while assets exist.
models.transcriptionstringModel call ID for speech transcription.
idstringGenerated library identifier: lib_ followed by 32 lowercase hexadecimal characters.
namestringDisplay name of the library; duplicate names are allowed.
labelsobjectCaller-defined string labels used to organize and filter libraries.
statusstringLibrary lifecycle: provisioning initializes the library; active permits asset operations; deleting awaits purge and may be restored before purge_at; deleted has been purged; failed indicates initialization failure.
asset_countnumberNumber of assets currently stored in the library.
bytesnumberTotal source-content size of the library’s assets, in bytes.
understandingobjectSettings controlling understanding tasks for new uploads.
understanding.visualbooleanEnable captions, tags and OCR for images and video frames.
understanding.transcriptbooleanEnable speech transcription for audio and video soundtracks.
understanding.embeddingbooleanEnable generation of vectors for semantic search.
created_atstringTime the library was created, in UTC.
updated_atstringTime library settings, lifecycle or usage were last updated, in UTC.
deleted_atstring | nullTime the library entered deleting, or null when active or restored.
purge_atstring | nullScheduled purge time while the library is deleting; null for an active or restored library.
curl -X PATCH "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"name":"walk-lib-r1-MDP-1791733789929-updated"}'

HTTP 200

{
  "id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "name": "walk-lib-r1-MDP-1791733789929-updated",
  "status": "active",
  "asset_count": 0,
  "bytes": 0,
  "created_at": "2026-10-11T15:50:04.230Z",
  "updated_at": "2026-10-11T15:50:07.147Z",
  "deleted_at": null,
  "purge_at": null,
  "search": {
    "image": true
  },
  "models": {
    "vision": "qwen3.8-flash",
    "embedding": "qwen3-vl-embedding",
    "transcription": "whisper-large-v3-turbo"
  },
  "labels": {
    "sample": "walk-lib-r1-MDP-1791733789929"
  },
  "understanding": {
    "visual": true,
    "transcript": true,
    "embedding": true
  }
}

Delete library

DELETE /media/v1/libraries/{library_id}

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Returns: Library.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
searchobjectSearch capabilities of this library’s embedding model.
search.imagebooleanWhether this library’s embedding model supports image-based visual search.
modelsobjectResolved model call IDs used for new uploads and reprocessing.
models.visionstringModel call ID for visual descriptions; the model must support image input.
models.embeddingstringModel call ID for search embeddings; must produce compatible vectors and cannot change while assets exist.
models.transcriptionstringModel call ID for speech transcription.
idstringGenerated library identifier: lib_ followed by 32 lowercase hexadecimal characters.
namestringDisplay name of the library; duplicate names are allowed.
labelsobjectCaller-defined string labels used to organize and filter libraries.
statusstringLibrary lifecycle: provisioning initializes the library; active permits asset operations; deleting awaits purge and may be restored before purge_at; deleted has been purged; failed indicates initialization failure.
asset_countnumberNumber of assets currently stored in the library.
bytesnumberTotal source-content size of the library’s assets, in bytes.
understandingobjectSettings controlling understanding tasks for new uploads.
understanding.visualbooleanEnable captions, tags and OCR for images and video frames.
understanding.transcriptbooleanEnable speech transcription for audio and video soundtracks.
understanding.embeddingbooleanEnable generation of vectors for semantic search.
created_atstringTime the library was created, in UTC.
updated_atstringTime library settings, lifecycle or usage were last updated, in UTC.
deleted_atstring | nullTime the library entered deleting, or null when active or restored.
purge_atstring | nullScheduled purge time while the library is deleting; null for an active or restored library.
curl -X DELETE "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
  "id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "name": "walk-lib-r1-MDP-1791733789929-updated",
  "status": "deleting",
  "asset_count": 2,
  "bytes": 140,
  "created_at": "2026-10-11T15:50:04.230Z",
  "updated_at": "2026-10-11T15:50:30.664Z",
  "deleted_at": "2026-10-11T15:50:30.664Z",
  "purge_at": "2026-10-18T15:50:30.664Z",
  "search": {
    "image": true
  },
  "models": {
    "vision": "qwen3.8-flash",
    "embedding": "qwen3-vl-embedding",
    "transcription": "whisper-large-v3-turbo"
  },
  "labels": {
    "sample": "walk-lib-r1-MDP-1791733789929"
  },
  "understanding": {
    "visual": true,
    "transcript": true,
    "embedding": true
  }
}

Restore library

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

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Returns: Library.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
searchobjectSearch capabilities of this library’s embedding model.
search.imagebooleanWhether this library’s embedding model supports image-based visual search.
modelsobjectResolved model call IDs used for new uploads and reprocessing.
models.visionstringModel call ID for visual descriptions; the model must support image input.
models.embeddingstringModel call ID for search embeddings; must produce compatible vectors and cannot change while assets exist.
models.transcriptionstringModel call ID for speech transcription.
idstringGenerated library identifier: lib_ followed by 32 lowercase hexadecimal characters.
namestringDisplay name of the library; duplicate names are allowed.
labelsobjectCaller-defined string labels used to organize and filter libraries.
statusstringLibrary lifecycle: provisioning initializes the library; active permits asset operations; deleting awaits purge and may be restored before purge_at; deleted has been purged; failed indicates initialization failure.
asset_countnumberNumber of assets currently stored in the library.
bytesnumberTotal source-content size of the library’s assets, in bytes.
understandingobjectSettings controlling understanding tasks for new uploads.
understanding.visualbooleanEnable captions, tags and OCR for images and video frames.
understanding.transcriptbooleanEnable speech transcription for audio and video soundtracks.
understanding.embeddingbooleanEnable generation of vectors for semantic search.
created_atstringTime the library was created, in UTC.
updated_atstringTime library settings, lifecycle or usage were last updated, in UTC.
deleted_atstring | nullTime the library entered deleting, or null when active or restored.
purge_atstring | nullScheduled purge time while the library is deleting; null for an active or restored library.
curl -X POST "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}/restore" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'

HTTP 200

{
  "id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "name": "walk-lib-r1-MDP-1791733789929-updated",
  "status": "active",
  "asset_count": 2,
  "bytes": 140,
  "created_at": "2026-10-11T15:50:04.230Z",
  "updated_at": "2026-10-11T15:50:31.379Z",
  "deleted_at": null,
  "purge_at": null,
  "search": {
    "image": true
  },
  "models": {
    "vision": "qwen3.8-flash",
    "embedding": "qwen3-vl-embedding",
    "transcription": "whisper-large-v3-turbo"
  },
  "labels": {
    "sample": "walk-lib-r1-MDP-1791733789929"
  },
  "understanding": {
    "visual": true,
    "transcript": true,
    "embedding": true
  }
}

Purge library

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

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Returns: PurgedLibrary.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
idstringIdentifier of the library that was permanently purged.
objectstringResource discriminator identifying a library receipt.
purgedbooleanTrue when permanent library cleanup has completed.
curl -X POST "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}/purge" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'

HTTP 200

{
  "id": "lib_d3881a2f54a34cd79121b9d659e8378c",
  "object": "library",
  "purged": true
}

Library

FieldTypeRequiredDescription
searchobjectyesSearch capabilities; search.image enables visual search
modelsMediaModelsyesModel call IDs by role; partial updates, null restores defaults
idLibraryIdyesResource ID
namestringyesName, 1–64 characters; duplicates are allowed
labelsobjectyesLabels object; JSON-encode for GET. PATCH replaces the whole object; {} clears it
statusLibraryStatusyesResource status
asset_countnumberyesAsset count
bytesnumberyesFile size in bytes
understandingUnderstandingSettingsyesVisual, transcript, and semantic understanding settings
created_atIsoTimestampyesCreation time
updated_atIsoTimestampyesUpdate time
deleted_atIsoTimestamp / nullyesDeletion time; null when not deleted
purge_atIsoTimestamp / nullyesRecovery deadline

LibraryPage

FieldTypeRequiredDescription
dataLibrary[]yesResults in this page
next_cursorstring / nullyesNext-page cursor; null or absent at the end

PurgedLibrary

FieldTypeRequiredDescription
idLibraryIdyesResource ID
object"library"yes—
purgedtrueyes—

Page

FieldTypeRequiredDescription
dataJSON[]yesResults in this page
next_cursorstring / nullyesNext-page cursor; null or absent at the end

UnderstandingSettings

FieldTypeRequiredDescription
visualbooleanyesEnable visual understanding
transcriptbooleanyesEnable transcription
embeddingbooleanyesEnable semantic understanding

Model roles

models selects a model call ID (callModelId) for each of three roles. Creating a library without it uses the defaults below. Updates change only the supplied roles; omitted roles remain unchanged. Set a role to null to restore its default, or set models: null to restore all defaults.

RolePurposeDefault
visionVisual understanding of images and video framesqwen3.8-flash
embeddingEmbed content and search queries for semantic retrievalqwen3-vl-embedding
transcriptionAudio transcriptionwhisper-large-v3-turbo

Writes check supplied model call IDs against the model catalog. A missing model returns 400 INVALID_PARAMS with Model <id> is not available; a catalog lookup failure returns 502 UPSTREAM_FAILED. The vision model must support image input, or the request returns 400 INVALID_PARAMS. Unknown roles, blank IDs, and invalid values also return 400.

Once a library contains assets, changing embedding returns 409 LIBRARY_INVALID_STATE with “库中已有素材时不能更换嵌入模型”. A single vector space must use the same model so that existing asset vectors and query vectors remain comparable. Restoring defaults is subject to the same lock if it changes embedding.

Changes to vision or transcription apply only to newly uploaded or reprocessed assets; existing assets are not automatically processed again. Without kinds, reprocess retries only failed kinds. Explicit kinds force reruns of selected ready, failed, or unsupported kinds and replace their results. For example, pass { kinds: ["visual"] } after changing vision, or { kinds: ["transcript"] } after changing transcription.

This PATCH restores only vision to its default and preserves the other roles:

curl -X PATCH "https://api.deepraxis.ai/media/v1/libraries/${LIBRARY_ID}" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"models":{"vision":null}}'

New libraries default to qwen3-vl-embedding with visual search; legacy libraries retain bge-m3. Read-only search.image indicates image-search capability. Other models are checked for 1024-dimensional output; incompatible dimensions return INVALID_PARAMS, while unavailable probes or missing caller identity return UPSTREAM_FAILED.

Export

On this page