Priority Policies
When the gateway and the app both want the engine, a priority policy decides who goes first.
At a glance
TTS_API_PRIORITYsets the mode.- Modes: studio_first, equal, api_first.
- Designed to avoid starvation.
The modes
| Mode | Behavior |
|---|---|
studio_first | Studio's own jobs take precedence over API jobs. |
equal | API and Studio jobs share the queue fairly. |
api_first | API jobs take precedence (for backend-style use). |
Avoiding starvation
Whichever mode you pick, scheduling avoids starving the other side. Set the mode via the TTS_API_PRIORITY environment variable. See Environment Variables.