Use with the REST API
Last updated
Was this helpful?
Last updated
Was this helpful?
The Serverless Hosted API V2 has one endpoint for all models and Workflows:
This is in contrast to the V1 API which had many different endpoints based on the type of models being inferred.
Object detection, Keypoint detection
https://serverless.roboflow.com
https://detect.roboflow.com
Instance Segmentation
https://serverless.roboflow.com
https://outline.roboflow.com
Classification
https://serverless.roboflow.com
https://classify.roboflow.com
Semantic Segmentation
Currently not supported
https://segment.roboflow.com
Foundation models (i.e. CLIP, OCR, YOLO-World)
https://serverless.roboflow.com
https://infer.roboflow.com
If you are working in Python, the most convenient way to interact with the Serverless API is to use the Inference Python SDK.
To use the SDK, first install it:
To make a request to the Serverless Hosted API V2, use the following code:
Above, specify your and .
Checks Roboflow API for workflow definition, once acquired - parses and executes injecting runtime parameters from request body
Roboflow API Key that will be passed to the model during initialization for artifact retrieval
List of field that shall be excluded from the response (among those defined in workflow specification)
Flag to request Workflow run profiling. Enables Workflow profiler only when server settings allow profiling traces to be exported to clients. Only applies for Workflows definitions saved on Roboflow platform.
false
Optional identifier of workflow
Controls usage of cache for workflow definitions. Set this to False when you frequently modify definition saved in Roboflow app and want to fetch the newest version for the request.
true