> 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/deploy/device-manager/making-changes/trigger-a-stream.md).

# Trigger a Stream

Streams set to "Triggered" mode do not run inference on every frame. Instead, they continuously capture frames from the camera and wait for an explicit trigger to run the configured Workflow against the most recent frame. This is useful when inference is expensive, when results are only needed at specific moments (for example, when a PLC signals that a part is in position), or when an external system controls the cadence of inspection.

You can trigger a stream two ways:

1. From the cloud, using the Deployment Manager dashboard.
2. From the edge, by calling a local HTTP endpoint on the device.

To use either method, the stream must already be set to "Triggered" mode when you [add it](/deploy/device-manager/setting-up/add-a-stream.md) or by [updating the device configuration](/deploy/device-manager/making-changes/update-device-configuration.md).

## Cloud Trigger

A cloud trigger is issued from the Roboflow app and forwarded to the device by Deployment Manager. Use it for manual triggering, demos, or when the system initiating the trigger has internet access but is not on the device's local network.

From the Deployment Manager dashboard, click on the Device that hosts the stream. Each Triggered stream has a "Trigger" button. Click "Trigger" to issue a single inference run against the latest frame:

While the device processes the trigger, the stream shows "Waiting for device...". When the device returns a result, the status updates to "Inference complete" and the rendered frame refreshes with the Workflow output.

The trigger is queued as a command on the device and is processed the next time the device polls Deployment Manager (typically within a few seconds). Cloud triggers are not designed for high-frequency triggering. If you need sub-second latency or are issuing more than a few triggers per minute, use an edge trigger instead.

## Edge Trigger

An edge trigger is an HTTP call made directly to the inference server running on the device. Use it for production triggering from a PLC, a local script, or any system on the same network as the device. Edge triggers avoid the round trip through Deployment Manager and are the recommended approach for latency-sensitive integrations.

The inference server on the device exposes a trigger endpoint for each running stream:

```
POST http://<device-ip>:8000/inference_pipelines/{pipeline_id}/trigger
```

Replace `<device-ip>` with the IP address of the device on your network, and `{pipeline_id}` with the ID of the stream you want to trigger. You can find the pipeline ID in the stream details in Deployment Manager.

The request body is optional. To override the Workflow parameters configured on the stream for a single trigger, include them in the body:

```json
{
  "workflows_parameters": {
    "confidence": 0.7
  }
}
```

A successful trigger returns the Workflow output for the captured frame:

```json
{
  "success": true,
  "data": {
    "frame_id": 1024,
    "timestamp": 1716220800.123,
    "workflow_output": [
      {
        "predictions": []
      }
    ]
  }
}
```

If the device has not yet captured a frame, or the pipeline is not running, the response returns `success: false` with a message describing the reason.

{% hint style="info" %}
The edge trigger endpoint is only reachable from the device's local network. To call it from outside, expose the device through your own network infrastructure or use the cloud trigger.
{% endhint %}

## Choosing Between Cloud and Edge Triggers

| Use case                                                              | Recommended trigger |
| --------------------------------------------------------------------- | ------------------- |
| Manually inspecting a stream from the Roboflow app                    | Cloud               |
| Demoing or testing a Triggered stream                                 | Cloud               |
| PLC, sensor, or barcode scanner on the same network as the device     | Edge                |
| Local script that needs the inference result back in the same request | Edge                |
| High-frequency triggering (more than a few per minute)                | Edge                |


---

# 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/deploy/device-manager/making-changes/trigger-a-stream.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.
