Deploy from the SaladCloud Portal.
Overview
Inference is powered by Ultralytics YOLO, a state-of-the-art object detection framework. The API can process image and video files, as well as YouTube video URLs (non-live streams), and supports both visual output (annotated images/videos) and structured JSON detection results. This API accepts any model configuration supported by the Ultralytics YOLO library as query parameters — such asconf
,
iou
, imgsz
, and others. For annotated videos, make sure they can be processed in less than 90 seconds, otherwise the
request will timeout.
Output Types
annotated=true
: Returns an image or video file with bounding boxes and confidence scores rendered on topannotated=false
(default): Returns structured JSON output with detection results
Omit the
Salad-Api-Key
header if you do not have authentication enabled.Example requests
Image URL, JSON output
Image Upload with Confidence Threshold, Annotated output
Process Local Video with object tracking, Annotated output
Process YouTube Video Link, JSON output
Add Custom Parameters (e.g. imgsz
, classes
, max_det
)
Additional Parameters
The API supports all YOLO-compatible parameters as query params — including but not limited to:conf
— confidence threshold (e.g.,conf=0.4
)iou
— intersection-over-union thresholdimgsz
— image sizeclasses
— filter by class IDsmax_det
— maximum number of detections
How To Use This Recipe
Authentication
When deploying this recipe, you can optionally enable authentication in the container gateway. If you enable authentication, all requests to your API will need to include your SaladCloud API key in the headerSalad-Api-Key
. See
the documentation for more information about authentication.
Replica Count
The recipe is configured for 3 replicas by default, and we recommend using at least 3 for testing, and at least 5 for production workloads. SaladCloud’s distributed GPU cloud is powered by idle gaming PCs around the world, in private residences, gaming cafes, and esports arenas. A consequence of this unique infrastructure is that all nodes must be considered interruptible without warning. If a 👨🍳 Chef (a compute host) decides they want to use their GPU to play a video game, or their dog trips on the power cord, or their Wi-Fi goes out, the instance of your workload running on that node will be interrupted, and a new instance will be allocated to a different node. This means you may want to slightly over-provision the capacity you expect to need in order to have adequate coverage during node reallocations. Don’t worry, we only charge for instances that are actually running.Logging
SaladCloud offers a simple built-in method to view logs from the portal, to facilitate testing and development. For production workloads, we highly recommend connecting an external logging source, such as Axiom. This can be done during container group creation.Deploy It And Wait
When you deploy the recipe, SaladCloud will find the desired number of qualified nodes, and begin the process of downloading the container image to the host machine. Depending on network conditions, downloading the container image may take several minutes. Eventually, you will see instances enter the running state, and show a green checkmark in the “Ready” column, indicating the workload is passing its readiness probe. Once at least 1 instance is running, the container group will be considered running, but for production you will want to wait until an adequate number of nodes have become ready before moving traffic over.