For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundChangelogSign In
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
  • API Reference
    • Overview
      • POSTUpload a media file
LogoLogo
PlaygroundChangelogSign In
API ReferenceFiles

Upload a media file

POST
https://api.assemblyai.com/v2/upload
POST
/v2/upload
$curl -X POST https://api.assemblyai.com/v2/upload \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/octet-stream" \
> --data-binary @path/to/file
1{
2 "upload_url": "https://cdn.assemblyai.com/upload/f756988d-47e2-4ca3-96ce-04bb168f8f2a"
3}
<llms-only> > For the complete documentation index, see [llms.txt](https://www.assemblyai.com/docs/llms.txt) </llms-only> Upload a media file to AssemblyAI's servers. <Note>To upload a media file to our EU server, replace `api.assemblyai.com` with `api.eu.assemblyai.com`.</Note> <Warning>Requests to transcribe uploaded files must use an API key from the same project as the key that was used to upload the file. If you use an API key from a different project you will get a `403` error and "Cannot access uploaded file" message.</Warning>
Was this page helpful?
Previous

Transcribe audio

Next
Built with

Upload a media file to AssemblyAI’s servers.

To upload a media file to our EU server, replace api.assemblyai.com with api.eu.assemblyai.com.
Requests to transcribe uploaded files must use an API key from the same project as the key that was used to upload the file. If you use an API key from a different project you will get a 403 error and “Cannot access uploaded file” message.

Authentication

Authorizationstring
API Key authentication via header

Request

This endpoint expects binary data of type application/octet-stream.

Response

Media file uploaded successfully
upload_urlstringformat: "url"
A URL that points to your audio file, accessible only by AssemblyAI's servers

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error
504
Gateway Timeout Error