Roboflow + Web Browser
Run Roboflow models in a web page with inferencejs, on images or a webcam, or stream video to Roboflow's servers with the web inference SDK.
How to connect Web Browser to Roboflow
5 stepsCopy your publishable key
Find the publishable key in your Roboflow workspace settings. inferencejs uses this key, not your private API key.
Install inferencejs
Run npm install inferencejs, or add the jsDelivr script tag for inferencejs to your page's head.
Load your model
Start a worker with your model ID, version and publishable key. Supported architectures include RF-DETR, Roboflow 3.0, YOLOv5 and YOLOLite.
Run inference on images or video
Pass an image or an HTMLVideoElement, such as a webcam feed, to infer and draw the predictions on the page.
Stream to the cloud for heavier work
For models inferencejs does not support, or multi-step Workflows, use @roboflow/inference-sdk to stream camera video over WebRTC to Roboflow's servers.
What teams build with Web Browser
Add a webcam demo to a web page
Run a model on the visitor's webcam with no server to maintain, as in our hand detector demo.
Run a full Workflow on live video
Stream the browser camera to Roboflow's GPUs and get Workflow results back in real time.
Questions
The current in-browser library is inferencejs, installed from npm as inferencejs.
inferencejs supports RF-DETR, Roboflow 3.0 (YOLOv8-compatible), YOLOv5, YOLOLite and Gaze Detection. Other models and Workflows run through @roboflow/inference-sdk on Roboflow's servers.
Use the publishable key with inferencejs; it is meant for the browser. Never ship your private API key. With @roboflow/inference-sdk in production, connect through a backend proxy that holds the key.
Why are companies choosing Roboflow?
The end-to-end platform for vision AI: create datasets, train models and deploy to production.
Flexible deployment modes
Move from a scalable cloud API to edge hardware like NVIDIA Jetson without managing complex dependencies.
Integrated workflow builder
Combine multiple AI models, custom business logic and third-party integrations into one production-ready pipeline in a low-code editor.
Model monitoring and alerts
Dashboards track confidence, inference time and request volume for your deployed models, and email alerts tell your team when confidence suddenly drops.













