你需要什么
最多添加 8 段视频。MP4 或 MOV 支持 H.264 和 H.265(HEVC),WebM 支持 VP8、VP9 和 AV1。每段视频不得超过 4 分钟、1080p 和 32 MB。
工作原理
Light 每秒采样一次,Medium 每 250 毫秒一次,High 每 50 毫秒一次,Extra High 每 10 毫秒一次。MediaAttention 对根据镜头和构图变化选出的帧估计空间显著性。Kinesis 1.7 根据画面运动更新中间的热力图,并在检测到镜头切换时清空历史。
如何解读结果
集中度介于 0 和 100 之间。当 80% 的预计注意力集中到画面中更小的区域时,集中度会升高。播放器显示当前值和按时长加权的视频平均值。三等分区域的百分比说明注意力如何分布。测量真实视线需要眼动追踪。
API 和价格
Check GET /v1/models for current model availability.
价格按视频时长计算,每项完成的分析最低 $0.01 USD。
- 模型 ID
kinesis- 输入
- MP4、MOV 或 WebM 视频
- 输出
- 时序热力图、视线轨迹、三等分区域显著性,以及各采样点和整段视频的集中度
- 工作台限制
- 4 分钟 · 1080p · 32 MB
请求
The API accepts one asynchronous job per request. The body includes the model ID and its input object. Send the key in Authorization from your server.
POST /v1/predictions发送输入。如果需要重试,请保留幂等键。202 Accepted任务处理期间,请保存 ID 和结果 URL。GET /v1/predictions/:id查看状态,等预测完成后读取结果。
状态示例 queued → running → completed / failed.
如果收到 401,请检查 API 密钥。如果收到 429,请稍候,再使用同一个幂等键重试。
POST /v1/predictions HTTP/1.1Host: wrongthinking.comAuthorization: Bearer <API_KEY>Content-Type: application/jsonIdempotency-Key: <REQUEST_KEY> { "model": "kinesis", "input": { "video_id": "<VIDEO_ID>", "level": "medium" }}输入和输出
需要准备什么
最多添加 8 段视频。MP4 或 MOV 支持 H.264 和 H.265(HEVC),WebM 支持 VP8、VP9 和 AV1。每段视频不得超过 4 分钟、1080p 和 32 MB。
Input fields
video_idstring- Attach the video to a Studio chat and copy the ID at the end of its /api/chats/files/{id} download link. Up to 4 minutes and 32 MiB.
levelstring- 可选。light, medium, high, extra-high。默认级别为 medium。
返回内容
时序热力图、视线轨迹、三等分区域显著性,以及各采样点和整段视频的集中度. 结果的主要字段 duration · rate · anchors · regions · focus · samples.
{ "id": "pred_demo_001", "model": "kinesis", "status": "completed", "result": { "kind": "video", "version": "Kinesis 1.7", "duration": 6.75, "rate": 4, "anchors": 7, "regions": [30.59, 46.79, 22.63], "samples": "<27 temporal maps>" }}回调
callback_url is an optional HTTPS URL on your server. The event reports the terminal status and includes a reference for retrieving the response.
- prediction.completed
- 预测已完成,可以获取结果。
- prediction.failed
- 预测失败。请查询状态以查看错误。
- batch.completed
- 批处理已结束。即使批次状态为部分成功,也要检查每一项。
When integrating, verify the signature before accepting the event, deduplicate by ID, and return 2xx after recording it. Compute HMAC-SHA256 using your signing secret as text and Wrongthinking-Timestamp + a dot + the raw body. Compare the hex digest with Wrongthinking-Signature after v1=. Retries follow the previous failure after 1, 5 and 15 minutes.
{ "id": "evt_demo_001", "type": "prediction.completed", "data": { "id": "pred_demo_001", "model": "kinesis", "status": "completed", "result_url": "/v1/predictions/pred_demo_001" }}批次
把同一模型的输入集中放在 items 下。为每项输入分配唯一的 custom_id,即使完成顺序不同,也能对应到正确的结果。
POST /v1/batches验证每项输入。若总大小或项目数超过上限,请拆分成多个批次。GET /v1/batches/:id查看每一项的状态。同一个批次可以同时包含成功和失败的项目。custom_id保存有效结果,只将需要重试的项目放入新的批次。
Each batch accepts 1–8 items, 512 KiB of JSON and 3 MiB of images combined. Up to two predictions run concurrently per account.
POST /v1/batches HTTP/1.1Host: wrongthinking.comAuthorization: Bearer <API_KEY>Content-Type: application/jsonIdempotency-Key: <REQUEST_KEY> { "model": "kinesis", "items": [ { "custom_id": "case-01", "input": { "video_id": "<VIDEO_ID>", "level": "medium" } }, { "custom_id": "case-02", "input": { "video_id": "<VIDEO_ID>", "level": "medium" } } ]}致谢与许可
Kinesis 1.7 · WrongThinkingWrongThinking · MediaAttention Apache 2.0
WrongThinking 基于 Pratyush Mahapatra 的 MediaAttention-Ads v1、UNISAL 和 UEyes 进行的时序改编。