To create a webhook, use set_webhook() on the transcription config. The URL must be accessible from AssemblyAI’s servers.Use submit() instead of transcribe() to create a transcription without waiting for it to complete.
You can authenticate webhook deliveries from AssemblyAI by including a custom HTTP header in the request.To add an authentication header, include the auth header name and value in set_webhook().
Webhook deliveries can fail for multiple reasons. For example, if your server is down or takes more than 10 seconds to respond.If a webhook delivery fails, AssemblyAI will attempt to redeliver it up to 10 times, waiting 10 seconds between each attempt. If all attempts fail, AssemblyAI considers the delivery as permanently failed.
submit() returns an object with the ID of the transcription. If the webhook delivery fails, you can use this ID to retrieve the transcript later.