Portkey provides a robust and secure gateway to use and observe Deepgrm's Speech-to-Text API.
Deepgram API is currently supported on Portkey's REST API, with support for Python & Node SDKs coming soon.
Speech to Text API
We set the target Deepgram API URL with the x-portkey-custom-host
header
We set the target provider as openai
to let Portkey know that this request should be handled similarly to OpenAI
curl 'https://api.portkey.ai/v1/listen' \
-H 'Authorization: Token $DEEPGRAM_API_KEY' \
-H 'Content-Type: audio/mp3' \
-H 'x-portkey-custom-host: https://api.deepgram.com/v1' \
-H 'x-portkey-provider: openai' \
-H 'x-portkey-api-key: $PORTKEY_API_KEY' \
--data-binary '@audio.mp3'
curl 'https://api.portkey.ai/v1/listen' \
-H 'Authorization: Token $DEEPGRAM_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-portkey-custom-host: https://api.deepgram.com/v1' \
-H 'x-portkey-provider: openai' \
-H 'x-portkey-api-key: $PORTKEY_API_KEY' \
-d '{"url": "https://dpgr.am/spacewalk.wav"}'
Refer to Deepgram API docs for more: