> 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/deployment/roboflow-cloud/cloud-streaming/quickstart.md).

# Cloud Streaming Quickstart

Connect one camera, start cloud processing for an object detection Workflow, and view its results in the Web App, the Roboflow Agent, or the HTTP API.

Connect one camera and run a Workflow that detects objects and draws its predictions. Follow the Web App, Roboflow Agent, or HTTP API steps.

## Before you start

You need a Roboflow workspace with credits for processing and a camera to connect. For an RTSP or USB camera, keep a computer running on the camera's network with the [Video Connector installed](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/install-a-connector.md). The connector must reach the camera and the internet.

Create and save a [Workflow](https://docs.roboflow.com/workflows/build/create-a-workflow) with:

* One image input.
* An Object Detection Model block named `model`, using a model your workspace can run (ex: `rfdetr-nano`).
* A Bounding Box Visualization block that receives the input image and model predictions.
* A `predictions` output and an image output from the visualization block, named `bounding_box_visualization` for this guide.

Test the Workflow on video before you point it at a live camera. Put a short video of a scene the model recognizes in a folder and start the connector with `--files-dir` to [loop the file as a live source](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/connect-a-source.md#loop-a-local-file). The file appears as a source you can run the Workflow on.

In the editor's run panel, "Enable Sinks" starts on. Turn it off while testing unless you want the Workflow to write to outside systems.

Publish the Workflow before you deploy it. A preview can run unpublished changes.

## Web App

### Connect the camera

<figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-44a2b7bba5beaaf8fa2c978b23a07c03db50fdc3%2Fcloud-streaming-shot01-source-list.png?alt=media" alt="Cloud Streaming source list with offline sources and Add Video Source."><figcaption><p>Open Cloud Streaming to view sources and add a camera. Sources in this example are offline.</p></figcaption></figure>

1. Open "Deployments", then "Cloud Streaming".
2. Click "Add Video Source", then "Connect a Camera".
3. Follow "Run the Connector" on a computer that can reach your camera. Keep the command's API key private.
4. Wait for "Confirm It's Connected" to show the connector online, then click "Done".
5. Select the camera from the source list. For a network camera, [add its RTSP URL or choose an ONVIF profile](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/connect-a-source.md#rtsp-and-onvif-cameras). USB cameras appear automatically on supported platforms.

<figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-891a6980b60e4b2db8de7e19117ee9619ea1f59a%2Fcloud-streaming-shot02-connector-connected.png?alt=media" alt="Connector setup dialog with its API key redacted and a successful connection."><figcaption><p>Run the connector and wait for the connection confirmation.</p></figcaption></figure>

Confirm that the source preview shows the intended camera. A thumbnail can be an older still, so do not use the thumbnail alone to confirm live video.

### Start processing

1. Open the source and choose "Run a Workflow".
2. Select your saved Workflow under "Workflow".
3. Set the Workflow's options, if the form shows them. Fill required "Workflow Inputs" and leave optional ones blank to use their defaults. "Visual Preview Output" selects the first image output; choose `bounding_box_visualization` if the Workflow has more than one.
4. Review the processing estimate and any confirmation shown, then click "Start Processing".

<figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-0bf2c75abf6814c079de99ed98e7758ca5ded6f2%2Fcloud-streaming-shot03-start-processing.png?alt=media" alt="Run a Workflow panel with a selected Workflow, visual output and Start Processing."><figcaption><p>Choose your Workflow and image output before starting. Output names and pricing in this example are illustrative.</p></figcaption></figure>

The app picks a GPU size from the Workflow's models. If the Workflow needs more GPU memory than that size has, the app moves it to a larger GPU automatically and the hourly rate changes to match. Starting can take time while a processor loads the model. The estimate is an hourly rate, not a fixed total. See [pricing and limits](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/pricing-and-limits.md).

### Check the result

The source page shows the input and Workflow output. Check that boxes appear on the expected objects. Use the processing metrics to inspect performance, "Latest Result" for the newest structured output, and "Activity" for lifecycle events.

<figure><img src="https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-39b4835b92704ef19fac1eb2a7e87d3c51374acd%2Fcloud-streaming-shot04-running-results.png?alt=media" alt="Running Workflow with annotated video and Latest Result."><figcaption><p>Compare input video with annotated output and inspect Latest Result. Displayed pricing is illustrative.</p></figcaption></figure>

An image output is needed for annotated video, but not for a JSON-only Workflow. See [consume results](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/consume-results.md) for output delivery and external integrations.

The run keeps processing after you leave the page or close the player. See [manage and monitor](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/manage-and-monitor.md) to track your runs.

### Start from the Workflow editor

You can also click "Deploy" in the Workflow editor (or "Use" when you open the Workflow in the Agent), choose "Cloud Streaming", and pick a connected source. This leads to the same flow.

To test unpublished changes instead, click "Run" in the editor and select a stream. This runs your changes for a short time, and any running deployment keeps going. Review [Workflow lifecycle](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/run-a-workflow.md#workflow-lifecycle) before making that preview continuous.

## Roboflow Agent

1. Open the Agent and ask: "Help me connect a camera and preview my object detection Workflow."
2. Choose an existing camera, or use "Network Streams" to set up the connector. For a short test without a connector, choose "Webcam" or "Phone" and complete the camera or QR setup.
3. Ask the Agent to preview your saved Workflow's draft on the selected camera. Check the video and predictions. A preview does not replace the current deployment.
4. For a camera connected through the connector or RTMP, click "Deploy Stream" above the chat box, or ask: "Deploy this running preview continuously." Review the price and confirm. The deployment keeps the exact Workflow, state, and sink settings from the preview. It does not publish your draft or turn disabled sinks back on.

A browser webcam or phone QR session cannot be promoted. Keep the controlling browser open while using a temporary preview. For continuous use, connect a camera through the connector or RTMP instead. If you only ask to disconnect a preview, a separate deployment keeps running.

## HTTP API

Use a workspace API key with the `video-inference-job:create`, `video-inference-job:read`, `workflow:read`, and `model:infer` scopes. See [API authentication](https://docs.roboflow.com/reference/platform/rest-api/authenticate-with-the-rest-api). Your workspace and Workflow slugs are in the Workflow editor's URL: `app.roboflow.com/YOUR_WORKSPACE/workflows/edit/YOUR_WORKFLOW_SLUG`.

### Find the source

List your sources and copy the `id` of a camera whose `status` is `connected`.

{% openapi src="/files/HZKHykExD3Pp9vVK5PrS" path="/{workspace}/video-sources/v1" method="get" %}
[cloud-streaming.yaml](https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-cd395b09f9a2722b9933387ceb31fc915f665fa3%2Fcloud-streaming.yaml?alt=media)
{% endopenapi %}

### Check the Workflow's inputs and outputs

Pick an output with `isImage: true` (ex: `bounding_box_visualization`) to get annotated video. Set other inputs with `workflowParameters`. The camera supplies the image input.

{% openapi src="/files/HZKHykExD3Pp9vVK5PrS" path="/{workspace}/video-sources/v1/workflow-interface" method="get" %}
[cloud-streaming.yaml](https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-cd395b09f9a2722b9933387ceb31fc915f665fa3%2Fcloud-streaming.yaml?alt=media)
{% endopenapi %}

### Start the job

Send a new `Idempotency-Key` for each run. With only `workflowUrl`, the job is a deployment on a Small GPU that keeps running after your script exits. Add `processorSize` for heavier models (see [GPU sizes](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/pricing-and-limits.md#gpu-sizes)).

{% openapi src="/files/HZKHykExD3Pp9vVK5PrS" path="/{workspace}/video-sources/v1/{sourceId}/jobs" method="post" %}
[cloud-streaming.yaml](https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-cd395b09f9a2722b9933387ceb31fc915f665fa3%2Fcloud-streaming.yaml?alt=media)
{% endopenapi %}

### Check the job

Read the job until `state` is `running`.

{% openapi src="/files/HZKHykExD3Pp9vVK5PrS" path="/{workspace}/video-jobs/v1/{jobId}" method="get" %}
[cloud-streaming.yaml](https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-cd395b09f9a2722b9933387ceb31fc915f665fa3%2Fcloud-streaming.yaml?alt=media)
{% endopenapi %}

### Get the results

Request a watch grant for the image output and open `whepUrl` in a WHEP-compatible player. Repeat the request every 30 seconds while you watch. Keep these URLs private.

{% openapi src="/files/HZKHykExD3Pp9vVK5PrS" path="/{workspace}/video-jobs/v1/{jobId}/watch" method="post" %}
[cloud-streaming.yaml](https://1583372177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoksNmwps1HmYr8TqHDnX%2Fuploads%2Fgit-blob-cd395b09f9a2722b9933387ceb31fc915f665fa3%2Fcloud-streaming.yaml?alt=media)
{% endopenapi %}

To send predictions to your own application, add a [Webhook Sink](https://docs.roboflow.com/deployment/roboflow-cloud/cloud-streaming/consume-results.md#send-results-with-a-workflow-sink) to the Workflow.
