> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/reference/inference/inference-sdk/workflows.md).

# Workflows

Start a local inference server with `inference server start`, then run a Workflow:

```python
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,
    },
)
```

Either `specification` is provided with the specification of the Workflow as described in [Workflow Definitions](https://docs.roboflow.com/workflows/developer-guide/developer-guide/definitions), or both `workspace_name` and `workflow_id` are given to use a Workflow predefined in the Roboflow app. `workspace_name` can be found in the Roboflow app URL once the browser shows the main panel of the workspace.

{% hint style="info" %}
**Server-side caching of Workflow definitions:** when you use `run_workflow(...)` with `workspace_name` and `workflow_id`, the server caches the definition for 15 minutes. If you change the definition in the Workflows UI and re-run the method, you may not see the change. To force processing without cache, pass `use_cache=False` as a parameter of `run_workflow(...)`.
{% endhint %}

**Workflows profiling:** you may request a profiler trace by passing `enable_profiling=True` to `run_workflow(...)`. If the server configuration enables trace exposure, you will find a JSON file with the trace in the directory specified by the `profiling_directory` parameter of [`InferenceConfiguration`](/reference/inference/inference-sdk/configuration.md) (default: `inference_profiling` in your current working directory). The traces can be loaded and rendered in Google Chrome at `chrome://tracing`.
