There are two endpoints to create a flow run via an API call: Flow Runs - flow_runs and Deployments - create_flow_run. Which one should I use and when?

There are two endpoints to create a flow run:

and:

The first one is used for ad-hoc runs, e.g. if you run a flow from your local IDE.

Use the latter if you want to create a flow run via an API call and let that run be executed by your remote agent. Here is how you can do that:

https://discourse.prefect.io/t/how-to-trigger-a-flow-run-from-a-deployment-via-api-call-using-python-requests-library-or-from-a-terminal-using-curl/1396