I’m encountering an issue while trying to upload an audio file to the AssemblyAI API via n8n. I keep receiving a 422 error with the following message:
“Upload failed, please try again. If you continue to have issues please reach out to support”
Here are the details of my setup:
Method: POST
API URL: https://api.assemblyai.com/v2/upload
Authorization Header: Correct API key
Content-Type: application/octet-stream
Data Sent: I’m passing the raw binary data of a .m4a file via {{$binary.audio.data}} from a form submission (file size: ~18MB, type: audio/x-m4a)
Issue: The upload consistently fails with a 422 error, even when mimicking the curl --data-binary request from the AssemblyAI documentation.
What I’ve Tried:
Sending the file as binary (file set as binary type in n8n), but this results in a timeout.
Testing with a smaller file to check if the issue is related to the file size, but the error still persists.
Double-checking the API key and file type, which seem correct.
Question:
Has anyone encountered this error when uploading files to AssemblyAI via n8n? Are there any specific settings or parameters I should adjust to make the upload work?
Thanks in advance for any suggestions or advice!
Lucas
Options:
Timeout: 120000 (increase to 120 seconds due to file size)
Ignore Response Code: Disabled
Form Trigger node keep the current setting, just make sure the field is set to “file” type
The “multipleFiles” option is set to false
Content-Type: The AssemblyAI API expects application/octet-stream for direct binary uploads, not multipart/form-data
Binary Data: Send the binary data directly in the body of the request request, not as a form parameter
Timeout: Increase the timeout for large files (18MB may take longer to upload)
File Format: Make sure the .m4a file is not corrupted by testing it in another player
Suggest your stream with some fixes
If this suggestion solved your problem, please mark my post as the solution (blue box with check mark) so that this ongoing discussion does not distract others who want to find the answer to the original question and click the heart. Thanks