Workflows Schema API
Programmatically describe a Workflow's inputs, outputs, typing hints, and kind schemas.
Purpose and Benefits
Using the API
import requests
WORKSPACE_NAME = "workspace-name"
WORKFLOW_ID = "workflow-id"
INFERENCE_SERVER_URL = "https://serverless.roboflow.com"
WORKFLOW_SCHEMA_ENDPOINT = f"{INFERENCE_SERVER_URL}/{WORKSPACE_NAME}/workflows/{WORKFLOW_ID}/describe_interface"
ROBOFLOW_API_KEY = "Your Roboflow API Key"
headers = {
"Content-Type": "application/json",
}
data = {
"api_key": ROBOFLOW_API_KEY,
}
res = requests.post(WORKFLOW_SCHEMA_ENDPOINT, headers=headers, json=data)
schema = res.json()
inputs = schema["inputs"]
outputs = schema["outputs"]
kinds_schemas = schema["kinds_schemas"]
typing_hints = schema["typing_hints"]Inputs and Outputs
Typing Hints
Kinds Schemas
Last updated
Was this helpful?