It should be done automatically. By default API tests will get a priority of 5 and UI-submitted tests will get a priority of 0 (you can check your getLocations.php to see the different priority queues).
If you need more granular control (like to give big bulk tests an even lower priority) I usually do that explicitly from the app calling the API and pass it as a runtest.php parameter though using different keys would let you change them centrally without having to update any code.
What I was going to do is set the monitoring tests as highest priority, UI submitted as medium, and the continuous integration tests as the lowest (though might swap the last two around depending on client preference)