Vionlabs Docs

Vionlabs scene-level Video-Text Retrieval API

The Scene Retrieval API offers semantic search capabilities for scenes across video asset(s).

Get Text Embedding

Get a text-retrieval embedding for a given text query. This embedding can be used to perform a vector similarity search against video embeddings.

GET
/results/semantic_scenes/v1/text-embedding
key<token>

In: query

Query Parameters

qQ

A text query for which to get a text-retrieval embedding.

version?Version

Version of the model to use

Response Body

curl -X GET "https://loading/results/semantic_scenes/v1/text-embedding?q=car+chase&version=string"
{
  "version_id": "string",
  "embedding": [
    0.11,
    0.2,
    "... (1024 floats total)",
    -0.11,
    0.99
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Scene Embeddings

Get Vionlabs text-retrieval embeddings for all scenes in a given video item. These embeddings can be indexed and used to rank and retrieve similar scenes to a text embedding of a user query. Please contact the Vionlabs team to inquire how to generate a corresponding text query embedding.

GET
/results/semantic_scenes/v1/video-embedding/{inventory_id}
key<token>

In: query

Path Parameters

inventory_idInventory Id

Customer identifier for a movie or series item in the catalog

Query Parameters

version?Version

Version of the model to use

Response Body

curl -X GET "https://loading/results/semantic_scenes/v1/video-embedding/string?version=string"
{
  "status": "success",
  "error": "string",
  "updated": "2019-08-24T14:15:22Z",
  "version_id": "string",
  "inventory_id": "string",
  "type": "movie",
  "data": {
    "inventory_id": "string",
    "type": "movie",
    "vionlabs_id": "string",
    "version_id": "string",
    "scene_embeddings": [
      {
        "start_ts": 0,
        "end_ts": 0,
        "embedding": [
          0.11,
          0.2,
          "... (1024 floats total)",
          -0.11,
          0.99
        ]
      }
    ]
  }
}
Empty
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Processing Statuses

Get a paginated list of Result Statuses for all video items. Results are ordered by processing time of a video asset, with the most recently updated assets first. This endpoint is useful for monitoring the progress of the semantic video embedding processing.

GET
/results/semantic_scenes/v1/video-embedding
key<token>

In: query

Query Parameters

from_utcdatetime?From Utcdatetime

Specifies start of time window (ISO 8601). If not specified then all results will be returned

Formatdate-time
to_utcdatetime?To Utcdatetime

Specifies end of time window (ISO 8601). If not specified then utcnow() value will be used.It is recommended to fix this argument while looping across pages to establish a fixed time window

Formatdate-time
page_num?Page Num

Specifies a positional number of page with results

Default0
Range0 <= value
page_size?Page Size

Specifies a max number of results per page

Default500
Range1 <= value
include_episodes?Include Episodes
Defaultfalse
version?Version

Product version code

Response Body

curl -X GET "https://loading/results/semantic_scenes/v1/video-embedding?from_utcdatetime=2024-03-06T20%3A00%3A00&to_utcdatetime=2024-03-07T20%3A00%3A00&page_num=0&page_size=500&include_episodes=false&version=string"
{
  "page_num": 0,
  "page_size": 0,
  "total_count": 0,
  "data": [
    {
      "status": "success",
      "error": "string",
      "updated": "2019-08-24T14:15:22Z",
      "version_id": "string",
      "inventory_id": "string",
      "type": "movie"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}