Video inputs
Send short videos to vision-capable models on /v1/chat/completions. Authenticated callers only — anon free-tier is text + image.
Video attachments are accepted on /v1/chat/completions and /policy/chat/completions only.
Use the same OpenAI-compatible content array shape as image attachments — substitute video_url for image_url.
Authenticated callers can send up to 25 MB raw / 30 seconds of MP4, WebM, or MOV. Anonymous free-tier requests are blocked from video and get a 400 with code video_anon_blocked.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ABLIT_KEY,
baseURL: "https://api.abliteration.ai/v1",
});
const response = await client.chat.completions.create({
model: "abliterated-model",
messages: [
{
role: "user",
content: [
{ type: "text", text: "Describe what happens in this clip." },
{ type: "video_url", video_url: { url: "https://example.com/clip.mp4" } },
],
},
],
});
console.log(response.choices[0]?.message?.content);Why only /v1/chat/completions?
Video support follows the canonical specs of each upstream endpoint family. The OpenAI Chat Completions spec includes video_url natively. Anthropic Messages and OpenAI Responses do not — they would need a translation layer that doesn't exist yet upstream. Sending video to those endpoints returns 400 with a neutral pointer back to docs.abliteration.ai.
Video formats and limits
Use one of the supported MIME types and stay within the size cap.
Sending video as a data URL
Embed the video as base64 inside the request body — same pattern as images.
{
"model": "abliterated-model",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Describe what happens in this clip." },
{ "type": "video_url", "video_url": { "url": "data:video/mp4;base64,AAAA..." } }
]
}
]
}Sending video as a public URL
The backend fetches the URL server-side. The same SSRF guard that protects image URLs applies to video URLs — private IPs (RFC1918, link-local, loopback) and metadata endpoints are rejected with code unsafe_video_url.
{
"model": "abliterated-model",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "What happens in this video?" },
{ "type": "video_url", "video_url": { "url": "https://example.com/clip.mp4" } }
]
}
]
}Video token counts
Video token cost is roughly proportional to the number of frames sampled and their resolution. A 2-second 128×256 clip is around 90 tokens; a 5-second 480p clip is around 2,000 tokens; a 10-second 360p clip is around 3,700 tokens. Downscale before sending if you don't need full resolution.
Streaming responses for video
Set stream: true and process delta chunks the same way as text-only completions — see the streaming guide. Note that latency to first token is higher for video than for text or image because vLLM samples and tokenizes frames before generating.
Anonymous free-tier callers
Requests with X-Free-Tier: true and no Authorization header are rejected with HTTP 400 and code video_anon_blocked. The error message points at https://abliteration.ai/dashboard/keys for an API key and https://docs.abliteration.ai/authentication for SDK setup. Text and image attachments remain free for anon callers.
Video moderation status
Video bytes currently flow to vLLM unmoderated. The accompanying prompt text is moderated. Per-frame moderation via ffmpeg first-frame extraction is planned before public launch — tracked as TODO(VIDEO-MODERATION) in backend/main.py:fetch_moderation_categories.