Integration guides · 2026-10-17
Video analysis API: asking Glimpse about a video
Get a video analyzed with elorian/glimpse through an OpenAI-compatible API: an https video_url part, one video per request, streaming, cache and cost.
Short answer: send the video as an https address in a video_url part
LLMTR is a gateway that gives access to language models from different providers through one OpenAI-compatible API. To get a video analyzed, you call Elorian's Glimpse with the model id elorian/glimpse on the /v1/chat/completions endpoint at https://llmtr.com/v1. The video's https address goes into the message as a video_url part and your question next to it as a text part; Glimpse returns the answer as text.
Elorian announced Glimpse on 16 October 2026 as a research preview. According to the announcement, the model works as an agent that uses multimodal tools which watch videos, transform images and write code, and it may watch a short interval of a video at a denser frame rate.
How do you get a video analyzed through an API?
The steps are short. Put the video at an address reachable over https. Add a part whose type is video_url to the message's content array and write your question in a text part. The Python example below sends the request with stream: true, prints the answer as it is written and then prints the usage from the last chunk. include_usage inside stream_options makes the token counts arrive in that last chunk.
The agent works before it answers, so an answer can take from a few seconds to several minutes, and the first chunk arrives once the agent has finished thinking. Meanwhile the stream can carry : keep-alive comment lines, which standard SSE clients skip. Without streaming, give the client a long timeout (1800 seconds, as in the example). If your connection drops while you wait, the request can still be billed.
The https://example.com/clip.mp4 address in the example is a placeholder; put your own video's address there. When you ask for a long description, check finish_reason. A value of length means the visible answer reached its limit: when you send no max_tokens, 4,096 applies, and the provider also states 4,096 tokens as the upper limit for the visible answer. In that case split the question or ask for a shorter summary.
A streaming request with the OpenAI Python SDK that sends a video by https address to elorian/glimpse; the answer prints as it is written and usage arrives in the last chunk.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://llmtr.com/v1",
api_key=os.environ["LLMTR_API_KEY"],
timeout=1800,
)
stream = client.chat.completions.create(
model="elorian/glimpse",
messages=[
{
"role": "user",
"content": [
{"type": "video_url", "video_url": {"url": "https://example.com/clip.mp4"}},
{"type": "text", "text": "What happens in this video? List the key moments with timestamps."},
],
}
],
stream=True,
stream_options={"include_usage": True},
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
if chunk.usage:
print()
print(chunk.usage)
Video rules: one video, https only
One request can carry at most 1 video and 20 images, earlier messages included. Video goes only by https address; a video sent as a base64 data URL is refused with a 400. To compare two videos, ask about each in its own request. If an earlier video is still in the conversation history, remove it from the history before sending a new one.
The provider decides how many frames to take from a video; the video_fps and pixels_per_frame fields are not supported and get a 400. Video length and resolution are subject to the provider's limits. If a video is refused, trim it or lower its resolution and send it again.
For follow-up questions about the same video, you can leave the video in the first message and add later questions as new user messages. Because the video in the history counts too, a conversation can hold only one video at a time. To move to another video, remove the earlier one from the history and add the new one.
| Rule | Value |
|---|---|
| Videos | 1 video per request (earlier messages included) |
| Images | up to 20 images per request |
| Video address | https only; a base64 video gets a 400 |
| Part type | video_url (image_url for images) |
| Frame sampling | set by the provider; video_fps and pixels_per_frame get a 400 |
| Context window | 220,000 tokens |
| Video frames | input, $0.60 / 1M tokens |
| Input read from cache | $0.06 / 1M tokens |
| Output (answer, reasoning and agent steps) | $3.00 / 1M tokens |
Video cost: frames are input tokens
A video's frames are billed as input tokens, so a long video uses far more input tokens than a short text request. Per 1M tokens the price is $0.60 for input, $0.06 for input read from cache and $3.00 for output. The agent's steps and reasoning count in completion_tokens and are billed at the output price. On a request with a video, do not estimate the cost from the length of the prompt text: how many input tokens the video takes depends on how many frames the provider takes from it, and it shows in each response's usage.
The provider states that a second question about the same video is mostly read from the cache. Because repeated prompt prefixes are cached, put the video at the start of the message and the question at the end when you plan several questions about the same clip; that keeps the prefix unchanged. Check how much was read from the cache in each response's usage.prompt_tokens_details.cached_tokens; the cache may not take effect on the very first repeat.
A worked example: if a repeat question about a video with 40,000 input tokens reads 36,000 of them from the cache, the input costs (4,000 x $0.60 + 36,000 x $0.06) / 1M = $0.00456. The same input without the cache costs $0.024. The figures are an example; the response's usage tells you how many tokens a video takes.
The answer is text: unsupported fields
Glimpse returns the answer as text. Files the agent creates while it works (charts, tables) are not returned through LLMTR. If you need the result in a particular shape (for example, a list with timestamps), describe it in the prompt, because a JSON response_format (json_object, json_schema) is not supported.
tools, tool_choice, stop, n above 1, logprobs, logit_bias, background and mode are also refused with a 400 before the request reaches the provider, and a refused request is not billed. Other fields such as seed, user and top_p are removed from the request and listed in the response's llmtr_dropped_parameters field. reasoning_effort takes low, medium and xhigh; when you send none, medium applies. The level does not change the unit price, but the reasoning tokens spent are added to completion_tokens.
Data notice and first request
This model is served through a third-party provider. The text, images and videos you send may be stored by the provider and used to train Elorian's models. Do not send sensitive, personal or customer data.
To start, create an account at llmtr.com, top up your balance from Dashboard > Billing, and create a key under Dashboard > API Keys, stored in the LLMTR_API_KEY environment variable. Then replace the video address in the example with your own video's https address and send the request. The same key works for the other models in the catalog.
Get a video analyzed with Glimpse
Put the video at an https address, send it to https://llmtr.com/v1 with elorian/glimpse as a video_url part with your question, and read the cost from usage.
- Prepare the video. Put the video at an address reachable over https. If the provider refuses a long or high-resolution video, trim it or lower its resolution.
- Send the request. Add a part whose type is video_url and a text part with your question to the message, pass elorian/glimpse as the model and send stream: true.
- Read the answer and the cost. Read the answer from the stream, then look at prompt_tokens, cached_tokens and completion_tokens in the usage of the last chunk.
Frequently asked questions
Can I send a video to Glimpse as base64?
No. Video goes only by https address in a video_url part; a video sent as a base64 data URL is refused with a 400.
Can I send more than one video in a request?
No. One video per request is accepted, and videos in earlier messages count too. To compare two videos, ask about each in its own request; if an earlier video is in the history, remove it before sending a new one.
How is the cost of a video analysis calculated?
The video's frames are billed as input tokens at $0.60 per 1M tokens, and the part read from the cache at $0.06. The answer, the reasoning and the agent's steps count as completion_tokens at $3.00. Each response's usage gives the real counts.