I would like to use Deepgram's enhanced tier in all cases where the enhanced tier is available, but in the event that the enhanced tier is not supported (as is the case with several languages), I would like to fallback to using the base tier.
The way I'm currently handling it is:
- Make the API call specifying tier=enhanced and language={some language code}
- If response.status_code != 200, try making the call again with tier=base and language={some language code}
- If response.status_code != 200 still, give up.
Is there a cleaner way to do this? For example, is there a supported syntax for setting a fallback model, e.g. tier=[enhanced, base], so that if enhanced fails, it automatically tries the base tier?