Vionlabs Docs

Vionlabs Video-Text Retrieval API

The Video-Text Retrieval API offers semantic search capabilities for video assets.

Get a list of titles that are most representative for a given search query.

GET
/results/semantic/v1/search
key<token>

In: query

Query Parameters

qQ

Search phrase used to discover content

limit?Limit
Default100
Range0 < value
version?Version

Specify the product version code.

Response Body

curl -X GET "https://loading/results/semantic/v1/search?q=I+want+to+laugh&limit=100&version=op-fp-vidtext-v1"
[
  {
    "vionlabs_id": "string",
    "ident": "string",
    "type": "string",
    "title": "string",
    "score": 0
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

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/v1/text-embedding
key<token>

In: query

Query Parameters

qQ

Human provided string like:'Emotional and inspiring stories about civil rights and social justice'

version?Version

Version of the model to use

Response Body

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

Get video embeddings status and data

Get text-retrieval embedding status and data for a given video item.

GET
/results/semantic/v2/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/v2/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",
    "embedding": [
      0.11,
      0.2,
      "... (256 floats total)",
      -0.11,
      0.99
    ]
  }
}
Empty
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get paginated list of items with the video embeddings statuses and data ordered by creation/update timestamp

Get text-retrieval video embedding statuses and data for all items in the catalog.

GET
/results/semantic/v2/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

Include episodes

Defaultfalse
version?Version

Product version code

Response Body

curl -X GET "https://loading/results/semantic/v2/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": []
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}