For the complete documentation index, see llms.txt. This page is also available as Markdown.

Trigger a Stream

Run a Workflow on demand against the latest frame from a Triggered 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 or by updating the device configuration.

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:

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

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.

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.

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

Last updated

Was this helpful?