blnkd docs
Console ↗
DOCUMENTATION

Video inputs

Ask typed questions about a short video clip.

Send an MP4 in videos and ask Noul, Choice, or Score questions about what is visible. Video is an input — the answer types stay the same.

In the playground, open a video example or choose Image or video to upload your own clip. Preview it before running the request.

Try the examples

Open Tag activity at a street crossing in the playground. The 12-second clip shows a real city intersection.

  • Choice tags the visible road users: pedestrians, vehicles, or both.
  • Noul checks whether people are visibly crossing the road.
  • Score rates visible pedestrian activity for a footage review queue.

Use these tags to find relevant clips in a recording library. Play the clip and compare its answers with what you can see.

Pro supports 8,192 input tokens, including video and questions.

What to send

  • One inline MP4 data URL. Remote URLs are not accepted.
  • Up to 10 MiB, 30 seconds, and 2,073,600 pixels per frame (1080p).
  • An image or a video in one request, not both.
  • H.264 video is recommended for browser playback. Audio is not processed.

Flash video requests support 32K context (32,768 tokens), shared by the video, state, questions and answer.

The complete JSON request can be up to 16 MiB. Base64 adds about one third to the file size — a 10 MiB clip becomes about 13.3 MiB before the rest of the request.

Write questions for sampled frames

blnkd samples up to four frames across the clip. It does not inspect every frame. A brief action can fall between samples, especially in a longer clip. Trim to the scene you want to inspect, and include an unclear option when the evidence may be incomplete.

Useful tasks include tagging a scene, choosing a review queue, and checking a visible condition. Do not use a negative answer as proof that an event never happened between sampled frames. Model probabilities are not a substitute for checking accuracy on your own clips.

Use the Python SDK

Install typesafe-sdk==0.7.1 and set BLNKD_API_KEY. Save a clip as clip.mp4. This example returns all three answer types:

python
import base64
import os
from pathlib import Path

from typesafe_sdk import Choice, Noul, RetryPolicy, Score, TypeSafeClient

video = base64.b64encode(Path("clip.mp4").read_bytes()).decode("ascii")

with TypeSafeClient(
    base_url=os.environ.get("BLNKD_URL", "https://api.blnkd.dev"),
    api_key=os.environ["BLNKD_API_KEY"],
    model="blink-1.0-flash",
    timeout=280.0,
    retry=RetryPolicy(max_retries=0),
) as client:
    response = client.system_one(
        state="Tag visible street activity for a footage review queue.",
        questions={
            "road_users": Choice(
                instructions="Which road users are visible?",
                criteria={
                    "mixed": "Both pedestrians and vehicles",
                    "pedestrians": "Pedestrians only",
                    "vehicles": "Vehicles only",
                    "unclear": "No road users can be identified",
                },
            ),
            "crossing": Noul(instructions="Are pedestrians visibly crossing the road?"),
            "activity": Score(
                instructions="Rate the visible pedestrian activity.",
                criteria=[
                    "No pedestrians visible",
                    "A few people, mostly standing or waiting",
                    "Several people walking or crossing",
                    "A dense crowd fills the crossing",
                ],
            ),
        },
        extra_body={"videos": [f"data:video/mp4;base64,{video}"]},
    )

print(response.model_dump_json(indent=2))

Send an HTTP request

Set BLNKD_URL to your API base URL and BLNKD_API_KEY to your secret key. This example uses raw HTTP. For the Python SDK, pass videos through extra_body — see SDK video requests.

python
import base64
import json
import os
import urllib.request
from pathlib import Path

clip = base64.b64encode(Path("clip.mp4").read_bytes()).decode()
body = {
    "model": "blink-1.0-flash",
    "state": "Tag only what is visible in this clip.",
    "videos": ["data:video/mp4;base64," + clip],
    "questions": {
        "setting": {
            "type": "choice",
            "instructions": "Where does the visible scene take place?",
            "criteria": {
                "outdoors": "Outside in an open environment",
                "indoors": "Inside a building",
                "mixed": "Both indoor and outdoor scenes",
                "unclear": "Not enough visible evidence",
            },
        },
    },
}
request = urllib.request.Request(
    os.environ["BLNKD_URL"].rstrip("/") + "/v1/systemone",
    data=json.dumps(body).encode(),
    headers={
        "Content-Type": "application/json",
        "User-Agent": "blnkd-python/1.0",
        "Authorization": "Bearer " + os.environ["BLNKD_API_KEY"],
    },
)
with urllib.request.urlopen(request, timeout=280) as response:
    print(response.read().decode())

Invalid clips return 422. Requests larger than 16 MiB return 413. For context-length errors, shorten the text state and questions as well as trimming the clip.

Set up your coding agent

Copy this prompt into your agent.