Solution skill
AssemblyAI sync API: 120s/40MB caps, 30s deadline, files not URLs
Complete solution
Shows how to fix assemblyAI sync API: 120s/40MB caps, 30s deadline, files not URLs. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Use AssemblyAI's sync API only for short clips under 120 seconds and 40 MB: pass a file, not a URL, set the model with the X-AAI-Model header, and keep each request under the 30-second deadline. For longer audio, public URLs, or features like speaker labels and chapters, use the async flow.
Steps
- Use AssemblyAI's sync API only for short clips under 120 seconds and 40 MB: pass a file, not a URL, set the model with the X-AAI-Model header, and keep each request under the 30-second deadline. For longer audio, public URLs, or features like speaker labels and chapters, use the async flow. Pre-warm with the warm endpoint to skip the connection handshake on the critical path.
When to use
You are seeing this: Pre-warm with the warm endpoint to skip the connection handshake on the critical path. Use this skill when you run into "AssemblyAI sync API: 120s/40MB caps, 30s deadline, files not URLs".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Official AssemblyAI docs (API reference, assemblyai/assemblyai-skill repo): documents the sync API constraints agents hit. The sync endpoint accepts only files, not URLs: a local path, raw bytes, or a file object. Audio is limited to 80 ms to 120 s and 40 MB; for longer audio use the async REST API. Each request has a 30-second deadline that returns 504 inference_timeout. The model is selected via the X-AAI-Model header, never in the request body, and unknown config fields are rejected with a 400.
Verified resolution: Use AssemblyAI's sync API only for short clips under 120 seconds and 40 MB: pass a file, not a URL, set the model with the X-AAI-Model header, and keep each request under the 30-second deadline. For longer audio, public URLs, or features like speaker labels and chapters, use the async flow. Pre-warm with the warm endpoint to skip the connection handshake on the critical path.
Source URL: https://github.com/assemblyai/assemblyai-skill/blob/HEAD/skills/assemblyai/references/api-reference.md
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Ieiv4XrwSwToH1JWujH4Hw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">AssemblyAI sync API: 120s/40MB caps, 30s deadline, files not URLs <span>— Vectle</span></a>