- The universal format is
video_url:{"type": "video_url", "video_url": {"url": "data:video/mp4;base64,..."}}works on Seed, Qwen, Kimi, MiniMax and Gemini. The olderimage_url+data:video/mp4form shown on earlier versions of this page only works on Gemini — every other model returns 400. - GPT, Grok, Claude, GLM and DeepSeek do not accept video input. GPT and GLM silently drop the video and still return 200, and GPT may even invent a plausible answer — see “Models that do not support video”.
- Gemini does not accept plain public video URLs: it may return
Request contains an invalid argument, or it may return 200 with the video silently dropped (prompt_tokensis only a few dozen) and answer that it cannot see the video — or even describe it as a black screen; Seed, Qwen and Kimi can take a public https URL directly.
Visual API Testing
Let an AI Agent Do the Integration
Copy this prompt and paste it into Codex / Claude Code / Cursor
It first fetches the plain-text version of this page (append .md to any docs URL), then writes code in your project's own stack — the universal video_url format, Gemini's no-public-URL rule and 20 MB cap, and checking prompt_tokens to confirm the video actually reached the model are already baked into the requirements.
Integrate / troubleshoot video understanding in this project: send a video to a multimodal model for summaries, scene descriptions, action analysis or timestamp referencing.
Read the docs before you touch code: fetch https://docs.apiyi.com/en/api-capabilities/video-understanding.md for the plain-text version of this page. For YouTube links also read the gemini/native pa …
- Endpoint and format: use the OpenAI-compatible
POST https://api.apiyi.com/v1/chat/completionsand always pass the video as …
9 requirements in total. Use the button below to copy the full prompt.
What this prompt protects you from
What this prompt protects you from
Supported models
These results come from tests run on 2026-10-11 (UTC+8): the same 10-second test clip (a different digit and shape every 2.5 seconds) was sent to every model, which had to list the digits in order with their timestamps. A blank image was used as a control to rule out answers produced without actually seeing the video.gemini-3.7-flash and gemini-3.5-flash, plus the stable classics gemini-2.5-pro (2M context) and gemini-2.5-flash, are still available; 3.8 Flash used exactly the same video tokens as 3.5 Flash in our test (about 713 for 10 seconds) at half the input price. Latency and token figures apply to the 10-second 540p test clip above; longer or higher-resolution videos scale up roughly in proportion. Actual latency also depends on the endpoint and provider-side queuing, so the same clip can vary by 2–3×.
Models that do not support video
Video input methods
Quick start: the universal format (video_url)
Works with Seed, Qwen, Kimi, MiniMax and Gemini.
<BASE64_VIDEO> with the video’s base64 string, or replace the whole url with a public address):
Gemini-specific formats
Base64 inline (legacy image_url form)
Gemini accepts both the video_url form above and the image_url form below, so existing code keeps working; for new code, use video_url so you can switch models freely.
Base64 inline (Gemini native format)
If your project already uses Google’s officialgoogle-genai SDK, there is no need to switch to the OpenAI-compatible format: point base_url at https://api.apiyi.com and inline the video with Part.from_bytes. As above, the whole request body must stay under 20 MB.
-d @req.json.
YouTube links (Gemini native format)
YouTube links need no download and are not subject to the 20 MB limit, but they only work through the Gemini native format (thegoogle-genai SDK, endpoint https://api.apiyi.com).
Models that do not support video: frames as images
For image-only models such as GPT and Grok, extract frames locally at a fixed interval and send them as multiple images. In our testsgpt-6-sol, gpt-6-luna, gpt-5.6-terra, grok-4.7 and grok-4.5 all described the content and order correctly from 4 frames. The trade-off: audio and the motion between frames are lost, and you need to state the timing in the prompt yourself.
Advanced tips
Timestamp referencing
Reference segments directly in the prompt withMM:SS — this is purely a prompting technique and works on any model that supports video:
Two ways an answer can be untrustworthy
① The video never reached the model: checkusage.prompt_tokens in the response. A 10-second clip is about 5,000 tokens on Seed / Qwen and about 700 on Gemini; if it is only a few dozen tokens, the video was dropped (this is what happens on GPT and GLM, and on Gemini when given a public URL), and the answer cannot be trusted. The model will not necessarily say it cannot see anything: given a public URL, Gemini describes the missing video as “a completely black screen”, and GPT invents content that is not there.
② The input is wrong and the prompt assumes content: for example the wrong file was sent, the video decoded to a black or gray screen, or a placeholder image was used during integration. Here prompt_tokens looks perfectly normal, so token counts will not catch it.
Prompt ideas for common tasks
The same video can drive very different analyses just by changing the prompt — no code changes required:- Content summary: summarize the topic, key scenes and takeaway in 3-5 sentences
- Lesson analysis: extract key concepts, chapter breakdown and important timestamps
- Surveillance review: flag unusual behavior, people/objects that appear, and when they appear
- Marketing review: assess how product selling points are presented, pacing and audience fit
- Motion analysis: break down action steps, posture cues and areas for improvement
Technical notes
- Gemini: samples at 1 frame per second by default and also processes the audio track; Gemini 3.x counts frames at low resolution by default, about 70 tokens per second in our test.
- Seed / Qwen: about 500 tokens per second in our test (540p video); Seed’s sampling can be tuned with
fps. - Kimi K3: about 1,400 tokens per second in our test, so long videos cost noticeably more.
- Supported formats: common formats such as mp4, mov and webm; converting to H.264 mp4 gives the best compatibility.
FAQ
Can GPT, Grok or Claude understand video?
Can GPT, Grok or Claude understand video?
Which Chinese models support video understanding?
Which Chinese models support video understanding?
seed-2-0-pro-260328, dola-seed-2-1-turbo-260628, seed-2-0-lite-260428, seed-2-0-mini-260428, seed-1-8-251228), Qwen’s qwen3.8-max, qwen3.8-flash, qwen3-vl-plus and qwen3.5-omni-plus, and kimi-k3. MiniMax-M3 recognizes the content but gets timestamps wrong. glm-5.3 and deepseek-v4-flash-vision-exp do not support video.The same code returns 400 when I switch models?
The same code returns 400 when I switch models?
image_url + data:video/mp4 form, which only Gemini accepts. Switch to {"type": "video_url", "video_url": {"url": ...}} and it works across providers.Gemini described things that are not in my video?
Gemini described things that are not in my video?
Public video URL returns Request contains an invalid argument / fetch failed
Public video URL returns Request contains an invalid argument / fetch failed
https://example.com/video.mp4); this is not an APIYI block. On Gemini, use Base64 inline (under 20 MB) or a YouTube link instead — or switch to Seed / Qwen, which can fetch public URLs directly. On /v1/chat/completions it does not always error: it may return 200 with the model claiming to see a black screen — in that case prompt_tokens is only a few dozen and the result is unusable.Why does Gemini cap requests at 20 MB? It used to work.
Why does Gemini cap requests at 20 MB? It used to work.
Can I use files.upload for large videos?
Can I use files.upload for large videos?
client.files.upload()) is not supported on third-party endpoints — only on Google’s own. For large videos, use a YouTube link, compress to under 20 MB for Base64, or switch to Seed / Qwen with a public URL.What about videos over 20 MB?
What about videos over 20 MB?