> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/roboflow/roboflow-jp/deploy/serverless/video-inference/api-reference.md).

# API Reference

Video Inference API は Roboflow Python SDK および REST API を通じて使用できます。

### ベースURL

API は次のURLを使用します:

```
https://api.roboflow.com
```

### APIメソッド

video inference へのアクセスには、roboflow Pip パッケージの使用を強く推奨します。\
\
生の Video Inference API は `https://api.roboflow.com` には3つのメソッドがあります:

<table><thead><tr><th>メソッド</th><th>説明</th></tr></thead><tbody><tr><td><code>POST</code> <code>/video_upload_signed_url/?api_key={{WORKSPACE_API_KEY}}</code></td><td><p>このエンドポイントは、ユーザーが動画をアップロードできる署名付きURLを返します。<br><br>このエンドポイントは、次のようにファイル名を含むJSON入力を受け付けます</p><pre><code>{
    "file_name": "my_video_file.mp4"
}
</code></pre><p>署名付きURLが返されます</p><pre class="language-json"><code class="lang-json">{
    "signed_url": "URL"
}
</code></pre><p><br>その後、お好みのアップロードプログラム（cURL など）を使って、署名付きURLに動画ファイルを PUT できます。</p><pre class="language-bash"><code class="lang-bash">curl -X PUT "my_signed_url" \\
-H "Content-Type: application/octet-stream" \\
--data-binary "@your_video.mp4"
</code></pre></td></tr><tr><td><code>POST</code> <code>/videoinfer/?api_key={{WORKSPACE_API_KEY}}</code></td><td><p>このエンドポイントは、処理用の video inference ジョブをスケジュールするための JSON 入力を受け付けます。INPUT_URL は公開されている URL であれば何でもよく、先に署名付きURLを作成してから Roboflow に動画をアップロードする必要はありません。</p><p>リクエストの本文の例を以下に示します:</p><pre><code>{
    "input_url": "{{INPUT_URL}}",
    "infer_fps": 5,
    "models": [
        {
            "model_id": "rock-paper-scissors-presentation",
            "model_version": "4",
            "inference_type": "object-detection",
            "inference_params": {"confidence": 0.4}
        }
    ]
}
</code></pre><p>ご注意ください <code>models[*].inference_params</code> はオプションです。</p><p>レスポンスは次のような JSON 文字列です</p><pre class="language-json"><code class="lang-json">{
    "job_id": "fec28362-f7d9-4cc0-a805-5e94495d063d",
    "message": "このエンドポイントは videojob を作成します"
}
</code></pre><p><br>で複数のモデルを指定できます。 <code>models</code> 配列内で <code>infer_fps</code> フィールドは少なくとも <code>1</code> に設定し、その値は動画のフレームレートを超えてはなりません。ほとんどのユースケースでは、動画のフレームレートは、 <code>infer_fps</code> .</p></td></tr><tr><td><code>GET</code> <code>/videoinfer/?api_key={{WORKSPACE_API_KEY}}&#x26;job_id={{JOB_ID}}</code></td><td>このエンドポイントはジョブの現在のステータスを返します。このエンドポイントにはレート制限があるため、1分に1回を超えてポーリングしないでください。<br><br>ジョブが成功すると、返される JSON の <code>status</code> キーは 0 に設定され、 <code>output_signed_url</code> キーには video inference 結果のダウンロードリンクが含まれます。<br><br>もし <code>status</code> が 1 に設定されている場合、ジョブ処理が完了していないことを示します。1 より大きい値は、ジョブの失敗を示します。</td></tr><tr><td></td><td></td></tr></tbody></table>

保存された JSON ファイルを `output_signed_url` location からダウンロードしたら、解析して inference 情報を取得できます。json ファイルの形式は [こちらで説明されています](https://inference.roboflow.com/workflows/definitions/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-jp/deploy/serverless/video-inference/api-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
