Workflows
Run a Roboflow Workflow through the inference-sdk client, by workflow ID or by inline specification.
from inference_sdk import InferenceHTTPClient
# Replace ROBOFLOW_API_KEY with your Roboflow API Key
CLIENT = InferenceHTTPClient(
api_url="http://localhost:9001",
api_key="ROBOFLOW_API_KEY"
)
CLIENT.run_workflow(
specification={
"version": "1.0",
"inputs": [
{"type": "InferenceImage", "name": "image"},
{"type": "InferenceParameter", "name": "my_param"},
],
# ...
},
# OR
# workspace_name="my_workspace_name",
# workflow_id="my_workflow_id",
images={
"image": "url or your np.array",
},
parameters={
"my_param": 37,
},
)Last updated
Was this helpful?