必要なもの
動画を8本まで添付できます。MP4 と MOV では H.264 または H.265(HEVC)、WebM では VP8、VP9、または AV1 を使用してください。各動画の上限は4分、1080p、32 MB です。
しくみ
Light は1秒、Medium は250ミリ秒、High は50ミリ秒、Extra High は10ミリ秒ごとにサンプリングします。MediaAttention はショットや構図の変化に応じて選んだフレームの空間的顕著性を推定します。Kinesis 1.7 は動きに基づいてその間のマップを更新し、カットを検出すると履歴をリセットします。
結果の読み方
集中度は0~100です。推定される注意の80%がフレーム内のより狭い範囲に集まるほど高くなります。プレーヤーには現在のスコアと時間で重みづけした動画全体の平均が表示されます。3領域の割合から注意の分布がわかります。実際の視線の計測にはアイトラッキングが必要です。
API と料金
Check GET /v1/models for current model availability.
動画の長さに応じた料金です。完了した分析1件につき、最低 $0.01 USD がかかります。
- モデル ID
kinesis- 入力
- MP4、MOV、または WebM 動画
- 出力
- 時間変化のヒートマップ、視線の軌跡、3領域の顕著性、各サンプルと動画全体の集中度
- Studio の上限
- 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 です。
返される内容
時間変化のヒートマップ、視線の軌跡、3領域の顕著性、各サンプルと動画全体の集中度. 結果の主なフィールド 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入力を1件ずつ検証します。合計サイズや件数が上限を超える場合は、複数のバッチに分けます。GET /v1/batches/:id各項目のステータスを確認します。1つのバッチに成功と失敗が混在することがあります。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 をベースにしています。