Reseller API is an API, where the Resellers can list, search and buy videos from Glymt.
The base endpoint for all the requests regarding the Reseller API
The authentication method used is OAuth2.0.
This will generate a new access token valid for 2hours.
The {user_name} and {user_password} refers to the username and password of the Reseller Glymt account
The {client_id} and {client_secret} refers to the client id and client secret provided by Glymt to the Reseller, you can verify this information on your Glymt account page
POST/auth/login
{
"grant_type": "password",
"username": {user_name},
"password": {user_password},
"client_id": {your_client_id},
"client_secret": {your_client_secret}
}
{
"status": 200,
"token": {access_token},
"access_token": {access_token},
"expiration_date": 5485
}
GET/videos/search
POST/videos/purchase
GET/videos/purchases
POST/videos/ai_search
GET/videos/ai_search/:id
This will retrieve a video list relatives to your search term.
Results come back 100 at a time, most relevant first. Pass
page to walk through them; count in the
response is the total number of videos the search matched, so you know
when to stop.
{
"page": 1,
"q": {search_term}
}
{
"status": 200,
"count": {total_matching_videos},
"videos":
[{
"id":{video_id},
"title": {video_title},
"duration": {video_duration},
"resolution_height":1080,
"resolution_width":1920,
"fps":25,
"has_audio":true,
"get_cover_url": {video_cover_url},
"get_unbranded_preview_filepath": {video_preview_url},
"get_unbranded_preview_hd_filepath": {video_preview_hd_url}}
}]
}
This will retrieve a video list relatives videos indiscriminately.
{
"page": 1
}
{
"status": 200,
"count": {total_videos_available},
"videos":
[{
"id":{video_id},
"title": {video_title},
"duration": {video_duration},
"resolution_height":1080,
"resolution_width":1920,
"fps":25,
"has_audio":true,
"get_cover_url": {video_cover_url},
"get_unbranded_preview_filepath": {video_preview_url},
"get_unbranded_preview_hd_filepath": {video_preview_hd_url}}
}]
}
Searches by meaning rather than keywords. Send a text description, up to two reference images, or both; results are ranked by visual and semantic similarity, not by tags.
This endpoint is asynchronous. Unlike
/videos/search, which returns results in the same
request, an AI search takes seconds to complete — longer with
auto_filter enabled. Submitting returns a
search_id immediately; poll
/videos/ai_search/:id for the result.
Parameters.
q is the text description. images is an
array of at most two objects, each with either data
(base64, optionally as a full data: URI) and
content_type, or url (https only, resolving
to a public address). JPEG and PNG only, 2MB per image. At least one
of q or images is required.
auto_filter runs each candidate through
a vision model that judges whether it actually matches the request.
It is considerably slower — tens of seconds rather than a few
— and it caps the result set at 20, where a plain search returns
up to 100. Use it when precision matters more than breadth.
Rate limits. 60 searches per hour, at most 3 running
at once, and a 6 second gap between submissions. Exceeding any of
these returns 429 with the reason.
{
"q": {search_term},
"auto_filter": false,
"images": [
{ "data": {base64_image}, "content_type": "image/jpeg" },
{ "url": {https_image_url} }
]
}
{
"status": 202,
"search_id": {search_id},
"auto_filter": false,
"images_accepted": 2,
"message": "Search accepted. Poll videos/ai_search/:id for the result."
}
Returns the state of a search you submitted. Poll every few seconds
until status is no longer 102.
102 — still processing. The HTTP
status is 200: an unfinished search is a normal state,
not an error.
200 — complete.
videos is in the same format
/videos/search returns, ordered by relevance, most
relevant first.
500 — the search failed;
message says why.
404 — no such search, or it
belongs to another account.
Results are limited to videos your reseller agreement covers, exactly
as /videos/search is. A search may therefore return fewer
videos than it matched.
{
"status": 102,
"search_id": {search_id},
"message": "Still processing."
}
{
"status": 200,
"search_id": {search_id},
"videos":
[{
"id":{video_id},
"title": {video_title},
"duration": {video_duration},
"resolution_height":1080,
"resolution_width":1920,
"fps":25,
"has_audio":true,
"get_cover_url": {video_cover_url},
"get_unbranded_preview_filepath": {video_preview_url},
"get_unbranded_preview_hd_filepath": {video_preview_hd_url}}
}]
}
This will purchase a video from Glymt and return the video url.
The video url will be available for 2 hours.
{
"id": {vide_id}
}
{
"status": 200,
"message": "Video purchased successfully.",
"video_url": {video_url}
}
This will return all of the purchases made by the Reseller.
{
"status": 200,
"licensed_videos": [
373710
],
"message": "Licenses loaded successfully."
}
This will return your account balance.
{
"status": 200,
"current_balance": [
300.00
],
"message": "Balance loaded successfully."
}